Type Alias RealtimeClientToolHandler
RealtimeClientToolHandler: (
toolName: string,
argsJson: string,
) => string | Promise<string>
Type Declaration
- (toolName: string, argsJson: string): string | Promise<string>
Parameters
- toolName: string
- argsJson: string
Returns string | Promise<string>
Handler for a CLIENT-EXECUTED UI tool (e.g. the live whiteboard's
Whiteboard_*surface), registered via RealtimeSessionService.RegisterClientToolHandler. Receives the tool name + raw arguments JSON from the realtime model and returns the result JSON string fed back as thetool_response. May be sync or async; thrown errors are wrapped into a{ success: false, error }payload by the service so the model can narrate the failure.