Closed
Labels
bugSomething isn't workingSomething isn't workingserver-fetchReference implementation for the Fetch MCP server - src/fetchReference implementation for the Fetch MCP server - src/fetchv2
Milestone
Description
Problem
call_tool in server.py never checks the tool name, so call_tool("nope", {"url": ...}) fetches the URL. get_prompt likewise never checks the prompt name and serves the fetch prompt for any name.
Where it is pinned
src/fetch/tests/test_protocol.py: test_call_tool_never_checks_the_tool_name, test_unknown_tool_name_still_validates_through_pydantic, test_get_prompt_never_checks_the_prompt_name, added in #4971 (Wave 1 of #4857). Each of these tests carries a KNOWN BUG marker: it asserts the current, wrong behavior, so the fix has to change it.
Expected
An unknown tool name returns an "Unknown tool" error, and an unknown prompt name returns an error rather than the fetch prompt.
Done when
- The behavior above is fixed, in the legacy-era (2025-11-25) server on SDK 1.x.
- The pinning tests assert the correct behavior, and their
KNOWN BUGmarkers are gone. - The per-file 90% coverage gate still passes.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingserver-fetchReference implementation for the Fetch MCP server - src/fetchReference implementation for the Fetch MCP server - src/fetchv2
Activity
cliffhall commentedon Oct 5, 2026
Fixed by #5016, merged into
v2/main(Wave 5 of #5004).fix(fetch): reject unknown tool and prompt names
fix(fetch): reject unknown tool and prompt names