import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; import type { Connection } from '@salesforce/core'; import { type McpAdapters } from '../config/mcp-config.js'; /** * Tool handler function type. * Accepts session-scoped adapters and pre-validated input. */ export type ToolHandler = (adapters: McpAdapters, input: unknown) => Promise; /** * Registry of tool handlers mapped by tool name. * * Derived from the authoritative tool registration in server.ts via getToolRegistrations(). * Used by invokeTool() for CLI dispatch and by tests for handler verification. */ export declare const TOOL_HANDLERS: Record; /** * Retrieves a tool handler by name. * * @param toolName - Name of the tool * @returns Tool handler function or undefined if not found */ export declare function getToolHandler(toolName: string): ToolHandler | undefined; /** * Invokes a tool by name with the given input. * * When debug mode is enabled, logs: * - Tool name and input params at start * - Result status, timing, and size on completion * - Error details on failure * * @param toolName - Name of the tool to invoke * @param connection - Salesforce connection * @param input - Tool input parameters * @param debug - Enable debug logging (optional) * @returns MCP CallToolResult */ export declare function invokeTool(toolName: string, connection: Connection, input: unknown, debug?: boolean): Promise;