import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { detectProjectName } from "../utils/ProjectIdentity"; /** Serialized size of every tool schema sent to the client, for cost accounting. */ export declare function getToolSchemaChars(): number; /** Every tool name with a registered handler, advertised or not. */ export declare function getRegisteredToolNames(): string[]; /** Tool names whose schemas this session sends to the client. */ export declare function getAdvertisedToolNames(): string[]; /** Which tools this session advertises, and why — surfaced by `token_budget`. */ export declare function getToolSurfaceSummary(): { profile: string; advertised: number; hidden: number; total: number; activeGroups: string[]; }; export interface ToolCallEvent { tool: string; args: Record; result: "OK" | "ERROR" | "HIT" | "MISS"; latency: number; tokensImpact?: number; error?: string; } /** * AN-18: `lemma_toolbox` is a dispatcher, not a tool. Every event the CallTool * wrapper emits — receipts, onToolCall, cost attribution — must name the tool that * actually ran, or all toolbox-dispatched errors/costs pile up under "lemma_toolbox" * and the per-tool accounting lies exactly the way the audit caught (18/19 errors * misattributed). Discovery (list/schema) stays under the toolbox name: no inner * tool ran, so there is nothing to attribute. */ export declare function effectiveToolName(name: string, args: Record | undefined): string; export declare function setupToolsHandlers(server: Server, onToolCall?: (event: ToolCallEvent) => void): void; /** * Onboarding built from the filesystem alone. * * The proxy produces a richer map, but this tool is in the core surface and CLAUDE.md tells * the model to call it first — so when the proxy is down, the first call of every session * used to return an error and the session started with no context at all. A local answer is * strictly better than that, and it never fails. */ export declare function buildLocalOnboarding(cwd: string): string; export declare const detectExpectedProjectName: typeof detectProjectName; //# sourceMappingURL=tools.d.ts.map