client_tool_call event to the connected browser, mobile app, or server. After running the function, that connected client sends client_tool_result to the server when a response is required.
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. Use enum inside a string property to list its allowed string values. 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.
expects_response is true, Cartesia waits up to response_timeout_secs for the result. If no result arrives, Cartesia automatically supplies Tool call timed out to the LLM.
To report its own failure, the connected client sends a result with is_error: true and an optional error_type.
Handle a tool call
is_error: true with a short result that the LLM can act on. The result is what the LLM receives. The optional error_type accepts a free-form string up to 256 UTF-8 bytes, such as timeout; a longer value discards the result as well. See the WebSocket event reference for complete event schemas.