Skip to main content
Glama
toolHelpers.ts419 B
import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js'; // Re-export McpError for use in tool handlers export { McpError }; export interface ServerContext { serverType: 'full' | 'minimal' | 'code'; availableTools: string[]; } export function asMcpError(error: unknown): McpError { const cause = (error as any)?.cause ?? String(error); return new McpError(ErrorCode.InternalError, cause); }

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/postmanlabs/postman-mcp-server'

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