You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the module does not provide a way to pass the handle_tool_error and handle_validation_error parameters to the StructuredTool instances created within the load_mcp_tools function. These parameters are useful for customizing how errors and validation failures are handled during tool execution.
Suggested Improvement:
It would be beneficial if load_mcp_tools accepted these optional parameters and forwarded them to the underlying StructuredTool constructor for each tool. This would allow users to inject custom error-handling logic without needing to manually patch the tools after they are loaded.
Use Case:
In applications where tool execution errors need to be gracefully handled, this flexibility would be valuable. Currently, users need to re-wrap or modify each returned tool, which is inefficient.