export type McpListedTool = {
    name: string;
    description?: string;
    inputSchema: Record<string, unknown>;
};
export declare class McpStdioClient {
    private readonly proc;
    private nextId;
    private readonly pending;
    private closed;
    private constructor();
    static spawn(params: {
        command: string;
        args: string[];
        env: NodeJS.ProcessEnv;
        cwd: string;
    }): Promise<McpStdioClient>;
    private attachIo;
    private handleLine;
    initialize(timeoutMs?: number): Promise<void>;
    listTools(timeoutMs?: number): Promise<McpListedTool[]>;
    callTool(name: string, args: Record<string, unknown>, timeoutMs?: number): Promise<string>;
    close(): Promise<void>;
    private notify;
    private request;
    private writeMessage;
}
