import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.js'; import type { McpServerConfig } from './mcp-manager.js'; /** A single tool advertised by an MCP server, trimmed to what the UI needs. */ export type McpTool = { name: string; description: string; }; export type ListServerToolsResult = { tools: McpTool[]; error?: string; }; /** * Build the SDK transport for a server config. Returns null when the config is * neither a usable stdio (command) nor http (url) entry. * * @param cwd Workspace dir used as the child-process cwd for stdio servers. */ export declare function buildTransport(config: McpServerConfig, cwd: string): Transport | null; /** * Connect to a configured MCP server and return its advertised tools. * * Never throws: connection/auth/timeout failures resolve to `{ tools: [], error }` * so the polled HTTP endpoint stays resilient. The whole connect→list→close * sequence is bounded by `timeoutMs`. * * @param cwd Workspace dir; passed verbatim to any spawned stdio child. */ export declare function listServerTools(config: McpServerConfig, cwd: string, timeoutMs?: number): Promise;