AiToolCall

References
public sealed class AiToolCall
A single tool invocation emitted by the model. Carries the tool name and the raw JSON-encoded arguments to be parsed by the tool-specific handler.

Constructors

AiToolCall

#
public AiToolCall(string id, string name, string argumentsJson)
id (string)
name (string)
argumentsJson (string)

Properties

ArgumentsJson

#
public string ArgumentsJson { get; }
JSON-encoded arguments matching the tool's parameter schema.

Id

#
public string Id { get; }
Provider-assigned identifier for this invocation. Anthropic returns a string like "toolu_01ABC...", OpenAI returns "call_..." -- in both cases the same string must travel back in the matching tool_result so the model can correlate. Play-act backends generate a synthetic id so call sites do not need to care which backend produced the call.

Name

#
public string Name { get; }
Name of the tool the model wants invoked, e.g. "Clarification".