Skip to main content
Middleware for handling tool validation and execution errors. This middleware wraps tool calls to catch any exceptions (including ValidationErrors) and returns them as formatted error messages to the LLM, enabling automatic retry.