Class ToolCall
Represents a single tool/function call emitted by a model.
A ToolCall is produced by parsing the model’s structured tool-call output and is then used by the runtime to dispatch the call: look up the matching ITool by Name and invoke it with ArgumentsJson.
The Id is intended for correlation across the request/response cycle: include the same identifier when returning the corresponding tool result so the model can associate each result with its originating call.
public sealed class ToolCall
- Inheritance
-
ToolCall
- Inherited Members
Properties
- ArgumentsJson
The JSON arguments object for the tool call, as a UTF-8 JSON string.
Guaranteed to be a non-empty JSON value; when the parsed payload is blank, this is normalized to
"{}"
. Pass this string directly to InvokeAsync(string, CancellationToken).
- Id
Stable identifier for this tool call within a turn.
If the model did not provide an identifier, the constructor assigns one in the form
call_<guid-n>
(a 32-hex GUID without dashes). Propagate this value with the tool result to enable correlation.