ParsedToolCall
Namespace: Vercel.AI.GenerateText
public sealed class ParsedToolCallA tool call after its input was parsed and validated. Maps to a TypedToolCall.
Inheritance: object
Constructors
Section titled “Constructors”ParsedToolCall(string, string, JsonElement)
Section titled “ParsedToolCall(string, string, JsonElement)”public ParsedToolCall(string toolCallId, string toolName, JsonElement input)Creates a parsed tool call.
Parameters
| Name | Type | Description |
|---|---|---|
toolCallId |
string | |
toolName |
string | |
input |
JsonElement |
Properties
Section titled “Properties”Dynamic
Section titled “Dynamic”public bool Dynamic { get; init; }True when the tool is dynamic: a dynamic tool, a provider-executed dynamic call, or an invalid call.
Maps to dynamic.
Value: bool
public Exception? Error { get; init; }Why the call is invalid, such as an InvalidToolInputError, a NoSuchToolError or a ToolCallRepairError.
Value: Exception
public JsonElement Input { get; }The parsed input. When Invalid is true this is the raw input, parsed when it is valid JSON and a JSON string otherwise.
Value: JsonElement
Invalid
Section titled “Invalid”public bool Invalid { get; init; }True when the call failed: 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.
Value: bool
ProviderExecuted
Section titled “ProviderExecuted”public bool ProviderExecuted { get; init; }True when the provider executed the tool.
Value: bool
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; init; }Provider-specific metadata of the call, as the model returned it.
Value: JsonElement?
public string? Title { get; init; }Display title of the tool.
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. It stays 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