/** * ToolCollector - Virtual MCP server that captures tool registrations * * This class mocks the McpServer.tool() method to intercept tool registrations * from existing registerXxxTools() functions and convert them to toolception's * McpToolDefinition format. */ export interface McpToolDefinition { name: string; description: string; inputSchema: Record; handler: (args: any) => Promise | any; annotations?: { readOnlyHint?: boolean; destructiveHint?: boolean; idempotentHint?: boolean; openWorldHint?: boolean; }; } /** * Interface for objects that can register tools * Used to provide type safety for registerXxxTools functions */ interface ToolRegistrar { tool(name: string, description: string, schema: Record, handler: (params: any) => Promise): void; } /** * Virtual server that captures tool registrations instead of registering them */ export declare class ToolCollector implements ToolRegistrar { private tools; /** * Mock implementation of McpServer.tool() that captures registrations * * @param name - Tool name * @param description - Human-readable description * @param schema - Zod schema object with parameter definitions * @param handler - Async function that handles tool execution */ tool(name: string, description: string, schema: Record, handler: (params: any) => Promise): void; /** * Get all captured tool definitions * @returns Array of toolception-compatible tool definitions */ getToolDefinitions(): McpToolDefinition[]; /** * Get count of captured tools * @returns Number of tools registered */ getToolCount(): number; /** * Clear all captured tools (useful for testing) */ clear(): void; } export {};