Parses one turn-taking tool call. Tolerant by design — a model that passes junk arguments to a harmless
signalling tool must still have its signal honoured, so a malformed to degrades to "no target" rather
than an error, and only genuinely unreadable JSON is Invalid.
Parameters
toolName: string
The tool the model invoked.
argsJson: string
The raw arguments JSON the model emitted (may be empty).
Parses one turn-taking tool call. Tolerant by design — a model that passes junk arguments to a harmless signalling tool must still have its signal honoured, so a malformed
todegrades to "no target" rather than an error, and only genuinely unreadable JSON isInvalid.