Commit 555c640
Drive resolver elicitation over the 2026-07-28 input_required flow
Resolvers that return Elicit[T] now negotiate the transport by protocol version:
at >= 2026-07-28 the framework returns an InputRequiredResult carrying the
batched questions and resumes when the client retries with
input_responses/request_state; at <= 2025-11-25 it keeps the synchronous
ctx.elicit() request. Author-facing code (Resolve/Elicit) is unchanged.
resolve_arguments becomes a resumable DAG walk: it reads ctx.input_responses /
ctx.request_state, memoizes resolver outcomes by a process-stable module:qualname
key, batches independent pending elicitations into one round, serializes
dependent ones across rounds, and carries resolved outcomes in request_state so
each resolver resolves once per logical call. Outcomes restored from
request_state are re-validated into their model via the Elicit[T] return arm.
request_state is client-trusted for now (HMAC sealing is a follow-up).
Add a render_elicitation_schema helper to elicitation.py, MRTR-loop and codec
tests, and document the transport in the migration guide.1 parent 24fdd90 commit 555c640
4 files changed
Lines changed: 501 additions & 80 deletions
File tree
- src/mcp/server
- mcpserver
- tools
- tests/server/mcpserver
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
90 | 102 | | |
91 | 103 | | |
92 | 104 | | |
| |||
103 | 115 | | |
104 | 116 | | |
105 | 117 | | |
106 | | - | |
107 | | - | |
| 118 | + | |
108 | 119 | | |
109 | 120 | | |
110 | 121 | | |
| |||
0 commit comments