/** * Tool Argument Interception, Normalization & Instrumentation Helpers * * Extracted from src/handlers/tools/index.ts to keep module sizes modular (< 420 lines). */ import type { ToolDefinition, ToolHandlerConfig, ProjectRegistryEntry } from '../../types/index.js'; /** * Common argument alias map for MCP tool invocations. */ export declare const ARG_ALIASES: Readonly>; /** * Keys that should be coerced to boolean when passed as string/number literals. */ export declare const BOOLEAN_COERCIONS: readonly string[]; /** * Keys that should be coerced to number when passed as numeric string literals. */ export declare const NUMBER_COERCIONS: readonly string[]; /** * Apply argument interceptions and hallucination healing for MCP tool calls. */ export declare function applyArgInterceptions(methodName: string, args: unknown[]): { args: unknown[]; } | { error: Record; }; /** * Inject resolved project names from the project registry into tool responses. */ export declare function injectProjectNames(obj: unknown, registry?: Record, depth?: number, seen?: WeakSet): void; /** * Map a tool group identifier to its Material Design icon metadata. */ export declare function getToolIcon(group: string): { iconUrl: string; title: string; description: string; } | undefined; /** * Wrap a tool handler with metrics, audit interceptor, and `use_test_db` context isolation. */ export declare function wrapToolHandlerWithInterceptors(toolName: string, handler: (params: unknown) => unknown, config?: ToolHandlerConfig): (args: Record) => Promise; /** * Instrument raw tool definitions with `use_test_db` schema extension and metrics/audit wrappers. */ export declare function instrumentToolDefinitions(rawDefs: ToolDefinition[], config?: ToolHandlerConfig): ToolDefinition[]; /** * Throw descriptive ResourceNotFoundError with Code Mode guidance when an unknown tool is called. */ export declare function throwToolNotFoundError(name: string): never; //# sourceMappingURL=arg-interceptions.d.ts.map