export interface ToolFunction { name: string; description?: string; parameters?: { type: "object"; properties?: Record; required?: string[]; [key: string]: unknown; }; } export interface Tool { type: "function"; function: ToolFunction; } /** * Cleans up tool definitions to ensure strict JSON Schema compliance. * * Implements "require" logic and advanced normalization: * 1. Filters 'required' array to remove properties that don't exist in 'properties'. * 2. Injects a placeholder property for empty parameter objects. * 3. Flattens 'anyOf' with 'const' values into 'enum'. * 4. Normalizes nullable types (array types) to single type + description. * 5. Removes unsupported keywords (additionalProperties, const, etc.). * * @param tools - Array of tool definitions * @returns Cleaned array of tool definitions */ export declare function cleanupToolDefinitions(tools: unknown): unknown; //# sourceMappingURL=tool-utils.d.ts.map