diff --git a/src/core/tools/__tests__/useMcpToolTool.spec.ts b/src/core/tools/__tests__/useMcpToolTool.spec.ts index 130047ae15..7fbd120fcb 100644 --- a/src/core/tools/__tests__/useMcpToolTool.spec.ts +++ b/src/core/tools/__tests__/useMcpToolTool.spec.ts @@ -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") }) }) diff --git a/src/i18n/locales/en/mcp.json b/src/i18n/locales/en/mcp.json index 0200e26d22..fcb302de88 100644 --- a/src/i18n/locales/en/mcp.json +++ b/src/i18n/locales/en/mcp.json @@ -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.",