GeneratedToolCall
Namespace: Vercel.AI.Provider
public class GeneratedToolCall : GeneratedContentA function tool call.
Inheritance: object → GeneratedContent
Derived: GoogleToolCall, HuggingFaceToolCall
Constructors
Section titled “Constructors”GeneratedToolCall(string, string, string, JsonElement?)
Section titled “GeneratedToolCall(string, string, string, JsonElement?)”public GeneratedToolCall(string toolCallId, string toolName, string argumentsJson, JsonElement? providerMetadata = null)Creates a tool call.
Parameters
| Name | Type | Description |
|---|---|---|
toolCallId |
string | |
toolName |
string | |
argumentsJson |
string | |
providerMetadata |
JsonElement? |
Properties
Section titled “Properties”ArgumentsJson
Section titled “ArgumentsJson”public string ArgumentsJson { get; }JSON object arguments.
Value: string
Dynamic
Section titled “Dynamic”public bool Dynamic { get; init; }True when the tool is not known up front, such as a provider-executed MCP tool. Maps to the call’s dynamic.
Value: bool
public Exception? Error { get; init; }Why the call is Invalid. Maps to error.
Value: Exception
Invalid
Section titled “Invalid”public bool Invalid { get; init; }True when the call failed to parse: its tool is unknown, its input did not parse, or the input did not match the tool’s
input schema. Such a call is Dynamic and is never executed. Maps to invalid.
Value: bool
ProviderExecuted
Section titled “ProviderExecuted”public bool ProviderExecuted { get; init; }True when the provider executed the tool, so the caller has nothing to run.
Value: bool
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; }Provider-specific metadata for this call, such as a thought signature.
Value: JsonElement?
public string? Title { get; init; }Display title of the tool, when the tool has one. Maps to title.
Value: string
ToolCallId
Section titled “ToolCallId”public string ToolCallId { get; }Provider id for this call.
Value: string
ToolMetadata
Section titled “ToolMetadata”public IReadOnlyDictionary<string, JsonElement>? ToolMetadata { get; init; }Metadata of the tool, kept apart from ProviderMetadata. Maps to toolMetadata.
Value: IReadOnlyDictionary<string, JsonElement>
ToolName
Section titled “ToolName”public string ToolName { get; }Tool name.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product