Wire an MCP tool — load tools from a server, not a registry — step 7 of 9
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 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
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.