/** * Tool/Function calling types for OpenRouter API */ export interface ToolDefinition { type: 'function'; function: { name: string; description: string; parameters: { type: 'object'; properties: Record; required: string[]; }; }; } export interface ToolParameter { type: 'string' | 'number' | 'boolean' | 'object' | 'array'; description: string; enum?: string[]; items?: ToolParameter; properties?: Record; } export interface ToolCall { id: string; type: 'function'; function: { name: string; arguments: string; }; index?: number; } export interface ToolResult { tool_call_id: string; role: 'tool'; name: string; content: string; } export interface ToolExecutionResult { success: boolean; output: string; error?: string; } /** * Tool executor function signature */ export type ToolExecutor = (args: Record) => Promise; /** * Tool registry entry */ export interface Tool { definition: ToolDefinition; executor: ToolExecutor; } //# sourceMappingURL=tools.d.ts.map