Property Id
Id
Gets the unique identifier for this tool call within a turn.
public string Id { get; }
Property Value
- string
A string identifier for correlation with the corresponding ToolCallResult.
Examples
Example: Using tool call ID for logging
foreach (ToolCall call in result.ToolCalls)
{
_logger.LogInformation(
"Tool call {Id}: {Name} with args {Args}",
call.Id,
call.Name,
call.ArgumentsJson);
}
Remarks
If the model did not provide an identifier, an auto-generated ID in the format
call_<guid> is assigned (a 32-character hex GUID without dashes).
Always propagate this value to the ToolCallId so the model can associate results with their originating calls.