/** Reusable function-tool contracts and execution registry. */ export type JsonSchema = Record; export interface RealtimeToolDefinition { type: "function"; name: string; description?: string; parameters: JsonSchema; } /** A remote MCP server or OpenAI-managed connector executed by Realtime. */ export interface RealtimeMcpTool { type: "mcp"; server_label: string; server_url?: string; connector_id?: string; authorization?: string; headers?: Record; allowed_tools?: readonly string[]; require_approval?: "always" | "never" | Record; server_description?: string; } export type RealtimeSessionTool = RealtimeToolDefinition | RealtimeMcpTool; export declare function defineMcpTool(tool: RealtimeMcpTool): RealtimeMcpTool; export interface ToolContext { callId?: string; signal?: AbortSignal; metadata?: Record; } export type ToolHandler = (args: TArgs, context: ToolContext) => TResult | Promise; export interface RealtimeTool extends RealtimeToolDefinition { execute: ToolHandler; } export interface ToolCall { name: string; callId: string; arguments: string | Record; } type AnyRealtimeTool = RealtimeTool; export declare class ToolRegistry { private readonly tools; constructor(tools?: readonly AnyRealtimeTool[]); register(tool: RealtimeTool): this; has(name: string): boolean; definitions(): RealtimeToolDefinition[]; execute(call: ToolCall, context?: Omit): Promise; } export declare function serializeToolOutput(output: unknown): string; export {}; //# sourceMappingURL=tools.d.ts.map