/** * MCP (Model Context Protocol) Types * * Type definitions for Model Context Protocol integration with LLM agents. */ /** * MCP Tool definition */ export interface McpTool { name: string; description: string; inputSchema: Record; outputSchema?: Record; } /** * MCP Tool call request */ export interface McpToolCall { id: string; name: string; arguments: Record; } /** * MCP Tool call result */ export interface McpToolResult { id: string; content: any; isError?: boolean; errorMessage?: string; } /** * MCP Resource definition */ export interface McpResource { uri: string; name: string; description?: string; mimeType?: string; } /** * MCP Resource content */ export interface McpResourceContent { uri: string; mimeType: string; text?: string; blob?: Buffer; } /** * MCP Prompt definition */ export interface McpPrompt { name: string; description?: string; arguments?: McpPromptArgument[]; } /** * MCP Prompt argument */ export interface McpPromptArgument { name: string; description?: string; required?: boolean; } /** * MCP Prompt message */ export interface McpPromptMessage { role: 'user' | 'assistant' | 'system'; content: string; } /** * MCP Server capabilities */ export interface McpServerCapabilities { tools?: boolean; resources?: boolean; prompts?: boolean; logging?: boolean; } /** * MCP Server configuration */ export interface McpServerConfig { name: string; version: string; capabilities: McpServerCapabilities; } /** * MCP Client configuration */ export interface McpClientConfig { serverUri?: string; transport?: 'stdio' | 'sse' | 'websocket'; timeout?: number; } /** * MCP Transport interface */ export interface McpTransport { send(message: any): Promise; receive(): AsyncGenerator; close(): Promise; } /** * MCP Error */ export declare class McpError extends Error { code: number; data?: any; constructor(message: string, code: number, data?: any); } export declare const MCP_ERROR_CODES: { readonly PARSE_ERROR: -32700; readonly INVALID_REQUEST: -32600; readonly METHOD_NOT_FOUND: -32601; readonly INVALID_PARAMS: -32602; readonly INTERNAL_ERROR: -32603; readonly TOOL_NOT_FOUND: -32001; readonly RESOURCE_NOT_FOUND: -32002; readonly PROMPT_NOT_FOUND: -32003; }; //# sourceMappingURL=types.d.ts.map