import { JSONRPCRequest, JSONRPCResponse, JSONRPCNotification } from '@modelcontextprotocol/sdk/types.js'; export interface ServerInfo { name: string; version: string; protocolVersion: string; } export interface ServerCapabilities { tools?: { listChanged?: boolean; }; resources?: { subscribe?: boolean; listChanged?: boolean; }; prompts?: { listChanged?: boolean; }; logging?: {}; } export interface InitializeParams { protocolVersion: string; capabilities: ClientCapabilities; clientInfo: { name: string; version: string; }; } export interface ClientCapabilities { experimental?: Record; sampling?: {}; } export interface InitializeResult { protocolVersion: string; capabilities: ServerCapabilities; serverInfo: ServerInfo; } export interface Tool { name: string; description: string; inputSchema: { type: "object"; properties: Record; required?: string[]; }; } export interface CallToolRequest { name: string; arguments?: Record; } export interface CallToolResult { content: Array<{ type: string; text?: string; data?: unknown; }>; isError?: boolean; } export declare enum MCPErrorCode { ParseError = -32700, InvalidRequest = -32600, MethodNotFound = -32601, InvalidParams = -32602, InternalError = -32603, ServerNotInitialized = -32002, UnknownErrorCode = -32001 } export interface MCPError { code: MCPErrorCode; message: string; data?: unknown; id?: string | number | null; } export type MCPRequest = JSONRPCRequest; export type MCPResponse = JSONRPCResponse; export type MCPNotification = JSONRPCNotification; export declare const MCP_METHODS: { readonly INITIALIZE: "initialize"; readonly INITIALIZED: "initialized"; readonly PING: "ping"; readonly TOOLS_LIST: "tools/list"; readonly TOOLS_CALL: "tools/call"; readonly RESOURCES_LIST: "resources/list"; readonly RESOURCES_READ: "resources/read"; readonly PROMPTS_LIST: "prompts/list"; readonly PROMPTS_GET: "prompts/get"; readonly LOGGING_SET_LEVEL: "logging/setLevel"; }; export type MCPMethod = typeof MCP_METHODS[keyof typeof MCP_METHODS]; export interface Transport { start(): Promise; stop(): Promise; send(data: unknown): Promise; onMessage(handler: (data: unknown) => void): void; onError(handler: (error: Error) => void): void; onClose(handler: () => void): void; } export interface ServerState { initialized: boolean; clientInfo?: { name: string; version: string; }; capabilities?: ClientCapabilities; } //# sourceMappingURL=types.d.ts.map