/**
 * MCP Tool Adapter.
 *
 * Bridges MCP servers to the Tool Registry, handling:
 * - Connection lifecycle management
 * - Tool discovery and registration
 * - Schema conversion (JSON Schema to Zod)
 * - Tool execution delegation
 */
import type { Logger } from "../../../util/logger.js";
import type { ToolRegistry } from "../../agent/tools2/registry.js";
import type { McpServerConfig, McpServerState, McpClientInterface } from "../types.js";
/**
 * Default tool name transformer.
 *
 * Creates prefixed names like "mcp_playwright_navigate"
 *
 * @param serverName - The MCP server name
 * @param toolName - The original tool name from the MCP server
 * @returns The prefixed tool name
 */
export declare const defaultToolNameTransform: (serverName: string, toolName: string) => string;
/**
 * Adapter that bridges MCP servers to the Tool Registry.
 *
 * Handles the complete lifecycle of MCP tool integration:
 * 1. Server connection management
 * 2. Tool discovery from MCP server
 * 3. Schema conversion (JSON Schema -> Zod)
 * 4. Tool registration with registry
 * 5. Execution delegation to MCP server
 * 6. Cleanup on disconnect
 *
 * @example
 * const adapter = new McpToolAdapter(registry, logger);
 *
 * // Register an embedded server
 * const client = new MCPClient(serverUrl, logger);
 * await client.connect();
 *
 * await adapter.addServer({
 *   name: "playwright",
 *   url: serverUrl,
 *   category: ToolCategory.GENERAL,
 *   defaultPermission: PermissionLevel.PROMPT
 * }, client);
 *
 * // Tools are now available in registry as "mcp:playwright:*"
 *
 * // Later, clean up
 * await adapter.removeServer("playwright");
 */
export declare class McpToolAdapter {
    private readonly registry;
    private readonly logger;
    private servers;
    constructor(registry: ToolRegistry, logger: Logger);
    /**
     * Adds an MCP server and registers its tools.
     *
     * @param config - Server configuration
     * @param client - MCP client instance (should already be connected or will be connected)
     * @returns Names of registered tools
     * @throws Error if server name already registered
     */
    addServer(config: McpServerConfig, client: McpClientInterface): Promise<string[]>;
    /**
     * Removes an MCP server and unregisters its tools.
     *
     * Note: The ToolRegistry doesn't currently support unregistering tools,
     * so this method disconnects the client and clears the tracking state.
     * Tools will fail on execute after removal.
     *
     * @param serverName - Name of server to remove
     */
    removeServer(serverName: string): Promise<void>;
    /**
     * Gets the current state of a server.
     *
     * @param serverName - Server name
     * @returns Server state or undefined if not found
     */
    getServerState(serverName: string): McpServerState | undefined;
    /**
     * Gets all registered server names.
     *
     * @returns Array of server names
     */
    getServerNames(): string[];
    /**
     * Gets tool names registered for a server.
     *
     * @param serverName - Server name
     * @returns Array of tool names or empty array if server not found
     */
    getServerTools(serverName: string): string[];
    /**
     * Checks if a server is registered.
     *
     * @param serverName - Server name
     * @returns True if server is registered
     */
    hasServer(serverName: string): boolean;
    /**
     * Removes all servers and cleans up.
     */
    dispose(): Promise<void>;
    /**
     * Creates a Tool instance for an MCP tool.
     *
     * @param config - Server configuration
     * @param client - MCP client for execution
     * @param toolDef - Tool definition from MCP server
     * @returns Tool instance ready for registration
     */
    private createTool;
    /**
     * Generates a human-readable summary for MCP tool execution.
     *
     * @param toolName - Original MCP tool name
     * @param input - Input parameters for the tool
     * @returns Separate summaries for input and output
     */
    private generateMcpToolSummary;
}
//# sourceMappingURL=mcp-tool-adapter.d.ts.map