export interface ToolDefinition { type: "function"; function: { name: string; description: string; parameters: { type: "object"; properties: Record; required?: string[]; }; }; } export interface ToolCall { id: string; type: "function"; function: { name: string; arguments: string; }; } export interface ToolResult { tool_call_id: string; role: "tool"; content: string; } export type ToolHandler = (args: any) => Promise;