InvalidToolInputError
Namespace: Vercel.AI.Util
public sealed class InvalidToolInputError : AiSdkError, ISerializable, IErrorMarkersThe input of a tool call does not match the tool’s input schema. Maps to InvalidToolInputError.
Inheritance: object → Exception → AiSdkError
Implements: ISerializable, IErrorMarkers
Constructors
Section titled “Constructors”InvalidToolInputError(string, string, Exception?, string?)
Section titled “InvalidToolInputError(string, string, Exception?, string?)”public InvalidToolInputError(string toolName, string toolInput, Exception? cause = null, string? message = null)Creates the error. <code class=“paramref”>message</code> defaults to the upstream format.
Parameters
| Name | Type | Description |
|---|---|---|
toolName |
string | |
toolInput |
string | |
cause |
Exception | |
message |
string |
Fields
Section titled “Fields”ErrorMarker
Section titled “ErrorMarker”public const string ErrorMarker = "vercel.ai.error.AI_InvalidToolInputError"Marker for IsInstance(object).
Value: string
Properties
Section titled “Properties”ToolInput
Section titled “ToolInput”public string ToolInput { get; }Raw input of the call.
Value: string
ToolName
Section titled “ToolName”public string ToolName { get; }Name of the tool that was called.
Value: string
Methods
Section titled “Methods”IsInstance(object?)
Section titled “IsInstance(object?)”public static bool IsInstance(object? error)Returns whether <code class=“paramref”>error</code> carries this error’s marker.
Parameters
| Name | Type | Description |
|---|---|---|
error |
object |
Returns: bool
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product