import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js'; import type { McpToolEntry } from './agentic-loop.js'; import type { McpServerEntry } from './gateway.js'; interface McpClientLike { connect(transport: StdioClientTransport): Promise; listTools(): Promise<{ tools: Array<{ name: string; description?: string; inputSchema: Record; }>; }>; callTool(params: { name: string; arguments?: Record; }): Promise>; close(): Promise; } export interface ConnectedMcpTools { tools: McpToolEntry[]; close: () => Promise; } export interface McpClientFactory { create(serverName: string): McpClientLike; transport(server: McpServerEntry, cwd: string): StdioClientTransport; } /** Convert an MCP tool result into deterministic text for the model conversation. */ export declare function formatMcpToolResult(result: Record): string; /** * Connect configured stdio MCP servers and adapt their tools to the direct-provider * agentic loop. The caller owns the returned handle and must close it in `finally`. */ export declare function connectMcpTools(servers: Record | undefined, cwd: string, factory?: McpClientFactory): Promise; export {}; //# sourceMappingURL=mcp-client-tools.d.ts.map