The model's arguments as a raw JSON string.
OptionalargsCorrelation id — echo it back on the tool result.
The declared tool name the model chose.
OptionalreplayedTrue when this delivery is a REPLAY of a still-outstanding call from a
turn that paused before a reconnect (see hello.ack pendingToolCalls) —
the app may have already performed it and crashed before posting the
result. Side-effecting tools should treat id as an idempotency key.
Absent on the original live delivery.
What
onToolCallhands your handler: thecompanion.tool_callwire payload plusargsJson—argspre-parsed as JSON.undefinedwhenargsis empty or not valid JSON; keep reading the rawargsstring when you need the exact model output.