client_tool_call event. Your application runs the function and, when required, responds with client_tool_result.
Define a client tool
POST /v1/agents/tools, then attach its ID through config.tools. See Tools for the shared execution settings.
Parameters
parameters must be a JSON Schema object. Properties may use string, integer, number, boolean, or an array of one of those scalar types. String properties may include an enum. Use required to identify values the model must supply.
Response behavior
expects_response: truemakes the agent wait for aclient_tool_resultwith the sametool_call_id. Use it when the result affects the conversation.expects_response: falsecompletes the tool after dispatch. Use it for client-side actions that the agent does not need to confirm.
response_timeout_secs is available only when expects_response is true.
Handle a tool call
is_error: true with a short result that the model can act on. See the WebSocket event reference for complete event schemas.