Skip to main content
Glama
types.ts1.19 kB
export interface Server { name: string; version: string; } export interface ServerCapabilities { resources: Record<string, unknown>; tools: Record<string, unknown>; } export interface ToolRequest { params: { name: string; arguments: Record<string, any>; }; } export interface ResourceRequest { params: { uri: string; }; } export interface Content { type: string; text: string; } export interface ToolResponse { content: Content[]; } export interface ResourceResponse { contents: { uri: string; mimeType: string; text: string; }[]; } export interface Tool { name: string; description: string; inputSchema: { type: string; properties: Record<string, any>; required?: string[]; }; } export interface Resource { uri: string; name: string; description?: string; mimeType?: string; } export interface ErrorResponse { code: number; message: string; } export class McpError extends Error { constructor(public code: number, message: string) { super(message); this.name = 'McpError'; } } export const ErrorCode = { InvalidRequest: 400, MethodNotFound: 404, InternalError: 500, } as const;

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/aldrin-labs/metal-mcp-server'

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