Skip to content

Add resolver dependency injection for MCPServer tools - #2969

Merged
maxisbey merged 21 commits into
mainfrom
resolver-dependency-injection
Jun 29, 2026
Merged

maxisbey merged 21 commits into
mainfrom
resolver-dependency-injection

Add refund_desk story: resolver-injected parameters hidden from the s…

1795a2d
Select commit
Loading
Failed to load commit list.
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

See this annotation in the file changed.

@claude 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