Skip to main content
Glama
IzumiSy

MCP Universal DB Client

response.ts893 B
/** * エラーレスポンスを作成するヘルパー関数 */ export const makeError = (error: unknown) => ({ content: [ { type: "text" as const, text: makeErrorText(error), }, ], isError: true, }); const makeErrorText = (e: unknown) => { if (e instanceof Error) { return `Error: ${e.message}`; } else if (typeof e === "string") { return `Error: ${e}`; } else { return "Unknown error"; } }; /** * 成功レスポンスを作成するヘルパー関数 */ export const makeSuccess = ( results: unknown[], additionalMessage?: string ) => ({ content: [ { type: "text" as const, text: JSON.stringify({ results }), }, ...(additionalMessage && additionalMessage.length > 0 ? [ { type: "text" as const, text: additionalMessage, }, ] : []), ], });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IzumiSy/mcp-universal-db-client'

If you have feedback or need assistance with the MCP directory API, please join our Discord server