import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import Anthropic from "@anthropic-ai/sdk";
import { McpConfig } from "../types";
import { Tool } from "../clients";
import { ToolsService } from "./Tools";
import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
type CachedTool = Anthropic.Tool;
export type McpTool = CachedTool & {
    inputSchema: CachedTool["input_schema"];
};
export declare const knowhowMcpClient: {
    name: string;
    version: string;
};
export declare const knowhowConfig: {
    capabilities: {};
};
export * from "./McpServer";
export * from "./McpWebsocketTransport";
export declare class McpService {
    connected: any[];
    transports: Transport[];
    clients: Client[];
    config: McpConfig[];
    tools: Tool[];
    mcpPrefix: string;
    toolAliases: Record<string, string>;
    createStdioClients(mcpServers?: McpConfig[]): Promise<Client<{
        method: string;
        params?: {
            [x: string]: unknown;
            _meta?: {
                [x: string]: unknown;
                progressToken?: string | number;
                "io.modelcontextprotocol/related-task"?: {
                    taskId: string;
                };
            };
        };
    }, {
        method: string;
        params?: {
            [x: string]: unknown;
            _meta?: {
                [x: string]: unknown;
                progressToken?: string | number;
                "io.modelcontextprotocol/related-task"?: {
                    taskId: string;
                };
            };
        };
    }, {
        [x: string]: unknown;
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            };
        };
    }>[]>;
    setMcpPrefix(prefix: string): void;
    createClient(mcp: McpConfig, transport: Transport): void;
    connectToConfigured(tools?: ToolsService): Promise<void>;
    connectTo(mcpServers?: McpConfig[], tools?: ToolsService): Promise<void>;
    connectAutoServers(): Promise<void>;
    connectSingle(serverName: string, timeout?: number): Promise<{
        success: boolean;
        toolsAdded: string[];
        error?: string;
    }>;
    disconnectSingle(serverName: string): Promise<{
        success: boolean;
        toolsRemoved: string[];
        error?: string;
    }>;
    getAvailableServers(): {
        name: string;
        connected: any;
        autoConnect: boolean;
        toolCount: number;
    }[];
    addTools(tools: ToolsService): Promise<void>;
    copyFrom(mcp: McpService): Promise<void>;
    closeTransports(): Promise<void>;
    closeClients(): Promise<void>;
    closeAll(): Promise<void>;
    getClientIndex(clientName: string): number;
    parseToolName(wrappedName: string): string;
    getToolClientIndex(toolName: string): number;
    getToolClient(toolName: string): Client<{
        method: string;
        params?: {
            [x: string]: unknown;
            _meta?: {
                [x: string]: unknown;
                progressToken?: string | number;
                "io.modelcontextprotocol/related-task"?: {
                    taskId: string;
                };
            };
        };
    }, {
        method: string;
        params?: {
            [x: string]: unknown;
            _meta?: {
                [x: string]: unknown;
                progressToken?: string | number;
                "io.modelcontextprotocol/related-task"?: {
                    taskId: string;
                };
            };
        };
    }, {
        [x: string]: unknown;
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            };
        };
    }>;
    getFunction(toolName: string, timeout?: number): (args: any) => Promise<{
        [x: string]: unknown;
        content: ({
            type: "text";
            text: string;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: Record<string, unknown> | undefined;
        } | {
            type: "image";
            data: string;
            mimeType: string;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: Record<string, unknown> | undefined;
        } | {
            type: "audio";
            data: string;
            mimeType: string;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: Record<string, unknown> | undefined;
        } | {
            type: "resource";
            resource: {
                uri: string;
                text: string;
                mimeType?: string | undefined;
                _meta?: Record<string, unknown> | undefined;
            } | {
                uri: string;
                blob: string;
                mimeType?: string | undefined;
                _meta?: Record<string, unknown> | undefined;
            };
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: Record<string, unknown> | undefined;
        } | {
            uri: string;
            name: string;
            type: "resource_link";
            description?: string | undefined;
            mimeType?: string | undefined;
            size?: number | undefined;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: {
                [x: string]: unknown;
            } | undefined;
            icons?: {
                src: string;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
                theme?: "light" | "dark" | undefined;
            }[] | undefined;
            title?: string | undefined;
        })[];
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
        structuredContent?: Record<string, unknown> | undefined;
        isError?: boolean | undefined;
    } | {
        [x: string]: unknown;
        toolResult: unknown;
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
    }>;
    callFunction<T = any>(toolName: string, args?: any): Promise<T>;
    getFunctions(): Promise<((args: any) => Promise<{
        [x: string]: unknown;
        content: ({
            type: "text";
            text: string;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: Record<string, unknown> | undefined;
        } | {
            type: "image";
            data: string;
            mimeType: string;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: Record<string, unknown> | undefined;
        } | {
            type: "audio";
            data: string;
            mimeType: string;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: Record<string, unknown> | undefined;
        } | {
            type: "resource";
            resource: {
                uri: string;
                text: string;
                mimeType?: string | undefined;
                _meta?: Record<string, unknown> | undefined;
            } | {
                uri: string;
                blob: string;
                mimeType?: string | undefined;
                _meta?: Record<string, unknown> | undefined;
            };
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: Record<string, unknown> | undefined;
        } | {
            uri: string;
            name: string;
            type: "resource_link";
            description?: string | undefined;
            mimeType?: string | undefined;
            size?: number | undefined;
            annotations?: {
                audience?: ("user" | "assistant")[] | undefined;
                priority?: number | undefined;
                lastModified?: string | undefined;
            } | undefined;
            _meta?: {
                [x: string]: unknown;
            } | undefined;
            icons?: {
                src: string;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
                theme?: "light" | "dark" | undefined;
            }[] | undefined;
            title?: string | undefined;
        })[];
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
        structuredContent?: Record<string, unknown> | undefined;
        isError?: boolean | undefined;
    } | {
        [x: string]: unknown;
        toolResult: unknown;
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number | undefined;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            } | undefined;
        } | undefined;
    }>)[]>;
    getToolMap(): Promise<{}>;
    connectAll(): Promise<void>;
    getClient(): Promise<Client<{
        method: string;
        params?: {
            [x: string]: unknown;
            _meta?: {
                [x: string]: unknown;
                progressToken?: string | number;
                "io.modelcontextprotocol/related-task"?: {
                    taskId: string;
                };
            };
        };
    }, {
        method: string;
        params?: {
            [x: string]: unknown;
            _meta?: {
                [x: string]: unknown;
                progressToken?: string | number;
                "io.modelcontextprotocol/related-task"?: {
                    taskId: string;
                };
            };
        };
    }, {
        [x: string]: unknown;
        _meta?: {
            [x: string]: unknown;
            progressToken?: string | number;
            "io.modelcontextprotocol/related-task"?: {
                taskId: string;
            };
        };
    }>[]>;
    getTools(): Promise<Tool[]>;
    getToolPrefix(index?: number): string;
    getWrappedFunctionName(toolName: string, index?: number): string;
    toOpenAiTool(index: number, tool: McpTool): Tool;
}
