ToolException#

class langchain_core.tools.base.ToolException[source]#

Exception thrown when a tool execution error occurs.

This exception allows tools to signal errors without stopping the agent. The error is handled according to the tool’s handle_tool_error setting, and the result is returned as an observation to the agent.

Examples using ToolException