fix: improve MCP tool error handling with retry logic and better messages #6191
+171
−54
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses issue #6189 where users were experiencing consistent failures when using the Memory Bank MCP tool, causing Roo to stop working.
Changes
1. Retry Logic with Exponential Backoff
2. Enhanced Error Handling
3. Parameter Validation
4. Better User Experience
Testing
Impact
These changes should significantly improve the reliability of MCP tool execution and provide users with clearer guidance when issues occur, preventing the "Roo stops working" scenario described in the issue.
Fixes #6189
Important
Enhances MCP tool error handling with retry logic, improved messages, and parameter validation, significantly improving reliability and user guidance.
executeToolAndProcessResult()inuseMcpToolTool.tsfor transient MCP tool failures.callTool()inMcpHub.tswith detailed error categorization and improved messages.validateParams()inuseMcpToolTool.ts, trimming whitespace and checking JSON format.mcp.jsonfor better internationalization support.useMcpToolTool.spec.tsandMcpHub.spec.tsto match new error message formats and retry logic.This description was created by
for 1a1fc31. You can customize this summary. It will automatically update as commits are pushed.