Repository navigation
Add resolver dependency injection for MCPServer tools - #2969
Merged
Merged
Claude / Claude Code Review
completed
Jun 29, 2026 in 25m 6s
Code review found 1 potential issue
Found 5 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/mcp/server/mcpserver/resolve.py:142-155 |
_wants_union misses ElicitationResult[T] as a union member |
Annotations
Check warning on line 155 in src/mcp/server/mcpserver/resolve.py
claude / Claude Code Review
_wants_union misses ElicitationResult[T] as a union member
When the documented `ElicitationResult[T]` alias appears as a union member — e.g. `Annotated[ElicitationResult[Login] | None, Resolve(login)]` or `Optional[ElicitationResult[Confirm]]` — `_wants_union` returns False, so the consumer silently receives the unwrapped model on accept and the call aborts with a `ToolError` on decline/cancel, the opposite of the branch-on-outcome intent the annotation expresses (the explicit-member spelling `AcceptedElicitation[Login] | None` *is* detected). Same fami
Loading