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.
⌘↵ runs the editor.read, then continue.
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.
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.