Elicitation, Multi Round-Trip Requests, Subscriptions and Tasks
In revision 2026-07-28 servers never send JSON-RPC requests. When a tool, prompt or resource read needs user input, a model completion or roots, the server returns an InputRequiredResult and the client retries the original request with the answers. Know the multi round-trip request (MRTR) rules and requestState security, the elicitation modes and their safety rules, the deprecated Sampling and Roots features, subscriptions/listen, the Tasks extension and how extensions are negotiated.
Key points
- 1
MRTR: a server MAY answer
tools/call,prompts/getorresources/read(and no other request) withresultType: "input_required", plusinputRequests(a map ofelicitation/create,sampling/createMessageorroots/listrequests) and/or an opaquerequestState. It MUST include at least one of the two. Every ordinary result carriesresultType: "complete". - 2
The retry is an independent request: it MUST use a new JSON-RPC id, MUST echo
requestStateexactly (and MUST NOT include one if none was given), and carriesinputResponseskeyed by the server'sinputRequestskeys. Neither field may be reused on other requests, including parallel ones. Because the server holds no pending state, any replica can handle the retry. - 3
requestStateis attacker-controlled. If it affects authorization, resource access or business logic it MUST be integrity-protected (HMAC or AEAD) and rejected when verification fails. Servers SHOULD bind the authenticated principal, a short expiry and the originating request (method plus a digest of its parameters). At-most-once use (for example coupon redemption) MUST still be enforced server-side. Use AEAD when the contents must stay secret. - 4
MRTR edge cases: if needed input is missing, the server SHOULD re-ask with a new InputRequiredResult rather than error. Unknown extra keys SHOULD be ignored. Servers MUST NOT assume the client will fulfil the request or retry, and MUST NOT ask for features the client did not declare in that request's
clientCapabilities. - 5
Elicitation form mode uses a flat object schema with primitive properties only: string (formats
email,uri,date,date-time), number or integer, boolean, and single- or multi-select enums. No nested objects and no arrays of objects. An emptyelicitation: {}capability means form mode only. - 6
Servers MUST NOT use form mode for passwords, API keys, access tokens or payment credentials. They MUST use URL mode, where the data never passes through the client.
acceptin URL mode means only consent to open the URL. The server learns the outcome on the retry, fromrequestStateor its own stored state, becausenotifications/elicitation/completeandelicitationIdwere removed. - 7
URL-mode client rules: never pre-fetch the URL or its metadata, never open it without consent, show the full URL first, and open it so that neither client nor LLM can see the page (a system browser sheet, not an embedded web view). Servers MUST NOT put credentials or PII in the URL or use pre-authenticated URLs, and MUST check that the user who opens the URL is the one who triggered it (phishing defence).
- 8
Third-party OAuth through URL mode makes the server an OAuth client. Third-party tokens MUST NOT transit the MCP client (not even encrypted inside
requestState), so the server must store them bound to the user's identity. It must never pass through the client's MCP token. Response actions areaccept,decline(an explicit no) andcancel(dismissed). - 9
Sampling (deprecated in 2026-07-28; migrate to direct LLM-provider APIs) lets a server borrow the client's model.
modelPreferencesholds cost, speed and intelligence priorities (0 to 1) plus advisory substringhints, and the client makes the final choice.maxTokensis required and MUST be respected. Tool loops needsampling.tools, tool-result-only user messages and a result for every tool use.toolChoiceisauto,requiredornone. TheincludeContextvaluesthisServerandallServersare deprecated. - 10
Roots (deprecated; migrate to tool parameters, resource URIs or server configuration) are
file://URIs that are informational only and never enforced.notifications/roots/list_changedwas removed. While roots last, they travel inside an InputRequiredResult asroots/list. - 11
subscriptions/listenreplacedresources/subscribe/unsubscribeand the HTTP GET stream. The client opts in totoolsListChanged,promptsListChanged,resourcesListChangedorresourceSubscriptions. The first message MUST benotifications/subscriptions/acknowledged, listing the honoured subset. Every notification carriesio.modelcontextprotocol/subscriptionId, which equals the listen request's JSON-RPC id. A graceful end is acompleteresponse to the listen request. Progress and log notifications stay on their own request's stream. - 12
The Tasks extension (
io.modelcontextprotocol/tasks) is negotiated per request. The server returnsresultType: "task"withtaskId,ttlMsandpollIntervalMs, durably created first. The client pollstasks/get, answersinput_requiredwithtasks/update, and may sendtasks/cancel(cooperative). There is notasks/listortasks/result.completed,failedandcancelledare terminal. Extensions are opt-in: clients declare them inclientCapabilities.extensions, servers inserver/discover, and the supporting side falls back gracefully (MCP Apps tools still return text).
Common traps
Saying a 2026-07-28 server sends
elicitation/createorsampling/createMessageas its own JSON-RPC request. Servers MUST NOT initiate requests; everything rides inside an InputRequiredResult.Retrying with the same JSON-RPC id, or reusing an old
requestStateon a round that did not send one.Trusting
requestStatebecause clients MUST NOT modify it. A malicious client can, so integrity protection is required, and base64 is not confidentiality.Collecting an API key or password with a form-mode field, or putting a clickable link in a form message to dodge URL-mode consent.
Reading URL-mode
acceptas proof that the out-of-band flow succeeded.Treating roots as a sandbox, or claiming Sampling and Roots were removed. They are deprecated and still work during the window (earliest removal: the first revision on or after 2027-07-28).
Expecting
Last-Event-IDreplay after a dropped listen stream. Resumability is gone, so re-subscribe and re-fetch.Assuming
tasks/cancelguarantees acancelledstatus. Cancellation is cooperative, and a task may still complete.
Read the source
Further reading
Suggest a resourceNo extra reading for Elicitation, Multi Round-Trip Requests, Subscriptions and Tasks yet. Found a guide, video or cheat sheet that made it click? Share it and help the next learner.
Test yourself on Elicitation, Multi Round-Trip Requests, Subscriptions and Tasks
Ten questions, with the answer and explanation after each one.