Table of Contents

Property ToolCallId

Namespace
LMKit.Agents.Tools
Assembly
LM-Kit.NET.dll

ToolCallId

Gets the identifier that correlates this result with its originating tool call.

public string ToolCallId { get; }

Property Value

string

The same ID as the corresponding Id that initiated this invocation.

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.