call
The model calls the tool name with args. The call is checked the way the
platform checks it:
- A tool the current step doesn’t offer, or one the agent doesn’t have, doesn’t
run. The model gets the platform’s reply, which names the tools it has, or the
agent’s
unavailable_function_responsewhen one is set. next_stepandchange_contextmove the call when the step allows the target.- A gated tool runs only when the gate callback passes every gate; otherwise the
model gets the first failing gate’s
on_fail, or an unclear gate’son_unclear. - Otherwise the tool’s handler, or its stub, runs with a request like the
platform’s, including
call_id,tool_call_id,global_data, anyrequest_fields, and the conversation whenswaig_post_conversationis on. Its result’s actions change the call. Apost_processresult’s actions wait for the nextagent_says(), and a newer one replaces actions still waiting.
Parameters
name
The tool’s name.
args
The arguments the model sends. None sends none.
Returns
SimulatedCall — What the call came to.
Raises
RuntimeError— the call has ended.ValueError— the tool is a DataMap tool and has no stub.ToolMentionError— withcheck_tool_mentions=True, the result names a tool the step it leaves the call in doesn’t offer.