promptdojo_

The MCP server returned a successful JSON-RPC response — but result.isError is True, meaning the tool itself reported failure. The current code ignores isError and treats the error message as a successful tool result, which the agent will then confidently relay to the user.

Fix the code to check isError and prefix the text with "TOOL_ERROR: " when the flag is True, so the agent sees the failure and can recover.

Expected output:

TOOL_ERROR: search service unavailable
The break is on line 13 — but read the whole snippet first.

this step needs the editor

on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.

open this same url on a laptop to keep going today.