AI_InvalidToolArgumentsError

This error occurs when invalid tool argument was provided.

Properties

  • toolName: The name of the tool with invalid arguments
  • toolArgs: The invalid tool arguments
  • message: The error message
  • cause: The cause of the error

Checking for this 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
}