Skip to main content
Glama
tools.ts593 B
import type { CallToolResult } from "@modelcontextprotocol/sdk/types"; export const createToolError = (error: unknown, message?: string): CallToolResult => { return { content: [ { type: 'text', text: ` ${message || 'Unexpected error while tool execution'} Error details: - message: ${error instanceof Error ? error.message : 'Unknown error'} - name: ${error instanceof Error ? error.name : 'Unknown error'} - stack: ${error instanceof Error ? error.stack : 'Unknown error'} `, }, ], }; };

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/simplypixi/bugbug-mcp-server'

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