title | description |
---|---|
AI_InvalidToolArgumentsError |
Learn how to fix AI_InvalidToolArgumentsError |
This error occurs when invalid tool argument was provided.
toolName
: The name of the tool with invalid argumentstoolArgs
: The invalid tool argumentsmessage
: The error messagecause
: The cause of the error
You can check if an error is an instance of AI_InvalidToolArgumentsError
using:
import { InvalidToolArgumentsError } from 'ai';
if (InvalidToolArgumentsError.isInstance(error)) {
// Handle the error
}