Property ToolCallId
ToolCallId
Gets the identifier that correlates this result with its originating tool call.
public string ToolCallId { get; }
Property Value
Examples
Example: Correlating calls and results
// Map results back to calls by ID
var resultsByCallId = toolResults.ToDictionary(r => r.ToolCallId);
foreach (var call in toolCalls)
{
if (resultsByCallId.TryGetValue(call.Id, out var result))
{
Console.WriteLine($"Call {call.Name} -> {result.Type}");
}
}
Remarks
This correlation is essential for the model to associate results with their originating calls, especially when multiple tools are called in a single turn.