Repository navigation
Add resolver dependency injection for MCPServer tools - #2969
Merged
Merged
Claude / Claude Code Review
completed
Jun 26, 2026 in 15m 46s
Code review found 2 potential issues
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 2 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | docs/migration.md:1476-1480 |
New public API documented only in migration.md, not the topic docs |
| 🟡 Nit | src/mcp/server/elicitation.py:40-44 |
ElicitationResult is now a TypeAliasType: isinstance() checks against it raise TypeError (undocumented behavior change) |
Annotations
Check warning on line 1480 in docs/migration.md
claude / Claude Code Review
New public API documented only in migration.md, not the topic docs
This PR adds new public API (`Resolve`, `Elicit`, the `ElicitationResult`/result-type re-exports on `mcp.server.mcpserver`, and `Context.headers`), but the only docs change is the new section in the v1→v2 migration guide. Per AGENTS.md's documentation guideline, the relevant topic pages should be updated in the same PR — `docs/tutorial/tools.md` and `docs/tutorial/elicitation.md` for resolver dependency injection, and `docs/tutorial/context.md` for `ctx.headers` — none of which currently mention
Check warning on line 44 in src/mcp/server/elicitation.py
claude / Claude Code Review
ElicitationResult is now a TypeAliasType: isinstance() checks against it raise TypeError (undocumented behavior change)
Changing `ElicitationResult` from a PEP 604 class union to a `TypeAliasType` is a runtime behavior change for an existing public symbol: `isinstance(result, ElicitationResult)` previously returned True/False but now raises `TypeError`, since a `TypeAliasType` is not a valid second argument to `isinstance()`. The change itself is justified (it makes `ElicitationResult[T]` subscriptable), but consider adding a one-line note to `docs/migration.md` that isinstance checks should target the member cla
Loading