promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_

Wire an MCP tool — load tools from a server, not a registry — step 6 of 9

The code is reading response["content"] directly, expecting the content list. But MCP wraps that list inside response["result"]. As written, this raises KeyError: 'content'.

Fix the access path to read from response["result"]["content"][0]["text"].

Expected output:

3 results for ramen tokyo
The break is on line 12 — but read the whole snippet first.

full-screen editor opens — close anytime to keep reading.