A deploy tool must not run until the user personally chooses a target environment from staging or production. The client declared the elicitation capability. Under revision 2026-07-28, which sequence should the server and client follow?
Select an answer to reveal the explanation.
Short Explanation
The server hands back a short form with two boxes, staging or production, and waits for you to fill it in. Then the client resubmits the deploy with your answer attached. The trap is the old style, where the server fired its own request mid-call.
Full Explanation
Under the multi round-trip requests pattern, a server that needs input while handling tools/call returns an InputRequiredResult whose inputRequests contain an elicitation/create request. Form mode suits this case: it collects structured, non-sensitive data through the client, here a choice between two environments described by a flat schema with an enumerated string. The client presents the form, the user accepts, declines or cancels, and the client retries the original tools/call with a new JSON-RPC id, the inputResponses carrying the user's answer, and any requestState echoed unchanged. The server then completes the deploy. Sending elicitation/create as a standalone server-to-client request is the legacy model; in this revision servers never send JSON-RPC requests, and the initial request ends when the InputRequiredResult is returned. Returning isError and asking the model to guess violates the requirement that the user personally chooses. A sampling request asks an LLM, not the user, for content, which again removes the human decision, and sampling is deprecated in this revision. Exam caveat: secrets such as deployment credentials must never be requested in form mode; those need URL mode. Operational check: trace the exchange and confirm the deploy runs only on the retry that carries an accepted elicitation response naming the environment.