export interface ToolWireDefinitionLike { name: string; description?: string | undefined; inputSchema: unknown; } export interface CompactToolDefinitionForWireOptions { /** Top-level tool description budget. */ descriptionMaxChars?: number | undefined; /** Per-JSON-Schema `description` annotation budget. */ schemaDescriptionMaxChars?: number | undefined; } export interface CompactWireToolDefinition { name: string; description: string; inputSchema: Record; } /** * Return the provider-wire version of a tool definition. * * Tool schemas remain structurally intact: validation keywords, property * names, required fields, enum values, and nested shapes are preserved. The * only reduction is on human prose annotations (`description`), which are the * largest repeated cost in provider tool declarations. */ export declare function compactToolDefinitionForWire(tool: ToolWireDefinitionLike, opts?: CompactToolDefinitionForWireOptions): CompactWireToolDefinition; /** * Tool inputs are always JSON objects, but dynamically supplied MCP/plugin * schemas sometimes express that object as a top-level oneOf/anyOf/allOf. * Anthropic-family endpoints reject those combinators at the input_schema * root (including when reached through an OpenAI-compatible gateway such as * OmniRoute). Keep nested combinators intact and flatten only the root. * Runtime validation still uses the tool's original schema. */ export declare function normalizeTopLevelToolSchema(schema: Record): Record; export declare function compactSchemaDescriptions(schema: unknown, maxDescriptionChars?: number): Record; export declare function compactDescription(text: string, maxChars: number): string; export declare function findSemanticBoundary(text: string, limit: number): number; //# sourceMappingURL=tool-wire-compact.d.ts.map