Repository navigation
test(fastmcp): Remove unused MCP request helpers - #8275
Merged
alexander-alderman-webb merged 1 commit intoNov 16, 2026
Merged
Conversation
The call_{tool,prompt,resource}_through_mcp helpers and their async
variants have had no callers since the FastMCP tests moved to real
transports (#5333, #5384, #5400) and the last call site was removed
in #7420. Drop them, the mcp.types import that only they used, and
the module docstring paragraph that described them.
Contributor
Coverage Results 📊✅ 139222 passed | ⏭️ 7861 skipped | Total: 147083 | Pass Rate: 94.66% | Execution Time: 447m 38s 📊 Comparison with Base Branch
✨ Test counts unchanged from base. All tests are passing successfully. ✅ Patch coverage is 100.00% (no changed executable lines found; target 80%). Coverage diff@@ Coverage Diff @@
## master #8275 +/-##
==========================================
+ Coverage 90.23% 90.25% +0.02%
==========================================
Files 203 203 —
Tracked lines 27335 27335 —
Branches 10246 10246 —
==========================================
+ Hits 24663 24669 +6
+ Misses 2672 2666 -6
- Partials 1556 1557 +1Generated by Coverage Action |
alexander-alderman-webb
approved these changes
Nov 16, 2026
alexander-alderman-webb
marked this pull request as ready for review
November 16, 2026 08:36
alexander-alderman-webb
deleted the
ref/fastmcp-remove-unused-mcp-call-helpers
branch
November 16, 2026 08:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes six helpers from
tests/integrations/fastmcp/test_fastmcp.pythat nothing calls:call_tool_through_mcp,call_prompt_through_mcp,call_resource_through_mcp, and their_asyncversions. Also removes the guardedmcp.typesimport (CallToolRequest,GetPromptRequest,ReadResourceRequest), which only those helpers used, and the module docstring paragraph that says all tests go through these low-level handlers. That paragraph is no longer true. 148 lines removed, nothing added.Why they're dead: #5075 added the helpers. The tests then moved to real transports: stdio in #5333, Streamable HTTP in #5384, and SSE in #5400. Those PRs removed most of the call sites. #7420 ("Remove vacuous tests") removed the last
call_tool_through_mcp(...)call, and the definitions stayed behind. Onmaster, each name only appears at its own definition (and the sync names in the async versions' docstrings).jsonandasyncioare still used elsewhere in the file.Why it's safe: it only touches tests. No SDK code, public API, documented behavior or dependency changes, and no test changes what it checks. No open PR touches
tests/integrations/fastmcp/.major/3.0has the exact same block, also unused, so merging master into it should apply cleanly.Issues
None. Found by the weekly sentry-python removal scout.
via automation
sched_65eed06cc199036c2b13411096f412d4· Run IDsched_65eed06cc199036c2b13411096f412d4:1794816000000.--
View Session [Sentry]