ExecutedTool
Namespace: Vercel.AI
public sealed class ExecutedToolThe result of executing a tool.
Inheritance: object
Constructors
Section titled “Constructors”ExecutedTool(string, string, string, bool)
Section titled “ExecutedTool(string, string, string, bool)”public ExecutedTool(string toolCallId, string toolName, string outputJson, bool isError)Creates a tool result.
Parameters
| Name | Type | Description |
|---|---|---|
toolCallId |
string | |
toolName |
string | |
outputJson |
string | |
isError |
bool |
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 the result’s dynamic.
Value: bool
public Exception? Error { get; init; }The exception the tool threw, when IsError is set by a failed execution. Maps to the error part’s error.
Value: Exception
InputJson
Section titled “InputJson”public string? InputJson { get; init; }The JSON input of the tool call this result answers, after any repair and refinement. Maps to the result’s input.
Value: string
IsError
Section titled “IsError”public bool IsError { get; }Whether execution failed or was denied.
Value: bool
OutputJson
Section titled “OutputJson”public string OutputJson { get; }JSON output.
Value: string
ProviderExecuted
Section titled “ProviderExecuted”public bool ProviderExecuted { get; init; }True when the provider ran the tool. Maps to the result’s providerExecuted.
Value: bool
ProviderMetadata
Section titled “ProviderMetadata”public JsonElement? ProviderMetadata { get; init; }Provider-specific metadata of the result, keyed by provider name.
Value: JsonElement?
public string? Title { get; init; }Display title of the tool. Maps to the result’s title.
Value: string
ToolCallId
Section titled “ToolCallId”public string ToolCallId { get; }Tool call id.
Value: string
ToolMetadata
Section titled “ToolMetadata”public IReadOnlyDictionary<string, JsonElement>? ToolMetadata { get; init; }Metadata of the tool. It stays apart from ProviderMetadata. Maps to the result’s 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