promptdojo_

Write bridge_mcp_tools(tools_list_response, mcp_call) that:

  • Takes a tools/list response (a dict with response["result"]["tools"]) and a mcp_call(tool_name, args) function (which simulates calling the server's tools/call and returns a tools/call response dict).
  • Returns a tuple (tools, schemas):
    • tools is a dict mapping each tool's name to a closure that calls mcp_call(name, args), unwraps response["result"]["content"][0]["text"], and returns it (prefixed with "TOOL_ERROR: " if isError is True).
    • schemas is a dict mapping each tool's name to its inputSchema.

Three tools come back. After bridging, dispatch one of them to prove it works. Expected output:

tool_names: ['search', 'read_url', 'summarize']
search_result: 3 results for ramen

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.