mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
fix: remove misleading 'Retrying...' from MCP invalid JSON error message
The error message for invalid JSON arguments in MCP tool calls incorrectly stated 'Retrying...' when no automatic retry was actually happening. This was misleading users into thinking the system would automatically retry with corrected JSON. Changed the message to clearly indicate the error and instruct users to manually retry with properly formatted JSON. Fixes #9378
This commit is contained in:
parent
7c079453dc
commit
ba02b5bee3
2 changed files with 3 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ vi.mock("../../prompts/responses", () => ({
|
|||
vi.mock("../../../i18n", () => ({
|
||||
t: vi.fn((key: string, params?: any) => {
|
||||
if (key === "mcp:errors.invalidJsonArgument" && params?.toolName) {
|
||||
return `Roo tried to use ${params.toolName} with an invalid JSON argument. Retrying...`
|
||||
return `Failed to use ${params.toolName}: Invalid JSON argument provided. Please ensure the arguments are properly formatted JSON and try again.`
|
||||
}
|
||||
if (key === "mcp:errors.toolNotFound" && params) {
|
||||
return `Tool '${params.toolName}' does not exist on server '${params.serverName}'. Available tools: ${params.availableTools}`
|
||||
|
|
@ -164,7 +164,7 @@ describe("useMcpToolTool", () => {
|
|||
|
||||
expect(mockTask.consecutiveMistakeCount).toBe(1)
|
||||
expect(mockTask.recordToolError).toHaveBeenCalledWith("use_mcp_tool")
|
||||
expect(mockTask.say).toHaveBeenCalledWith("error", expect.stringContaining("invalid JSON argument"))
|
||||
expect(mockTask.say).toHaveBeenCalledWith("error", expect.stringContaining("Invalid JSON argument"))
|
||||
expect(mockPushToolResult).toHaveBeenCalledWith("Tool error: Invalid args for test_server:test_tool")
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
"invalid_settings_validation": "Invalid MCP settings format: {{errorMessages}}",
|
||||
"create_json": "Failed to create or open .roo/mcp.json: {{error}}",
|
||||
"failed_update_project": "Failed to update project MCP servers",
|
||||
"invalidJsonArgument": "Roo tried to use {{toolName}} with an invalid JSON argument. Retrying...",
|
||||
"invalidJsonArgument": "Failed to use {{toolName}}: Invalid JSON argument provided. Please ensure the arguments are properly formatted JSON and try again.",
|
||||
"refresh_after_disable": "Failed to refresh MCP connections after disabling",
|
||||
"refresh_after_enable": "Failed to refresh MCP connections after enabling",
|
||||
"disconnect_servers_partial": "Failed to disconnect {{count}} MCP server(s). Check the output for details.",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue