UNPKG

systemprompt-mcp-reddit

Version:

A specialized Model Context Protocol (MCP) server that enables you to search, read, and interact with Reddit content, leveraging an AI Agent to help with each operation.

25 lines 756 B
// Helper function to format tool responses export function formatToolResponse(response) { const standardResponse = { status: response.status || "success", message: response.message, ...(response.result && { result: response.result }), ...(response.error && { error: response.error }), }; return { content: [ { type: "text", text: JSON.stringify(standardResponse, null, 2), }, ], ...(response.schema && { _meta: { schema: response.schema, type: response.type, title: response.title || response.message, }, }), }; } //# sourceMappingURL=types.js.map