Skip to main content
This lesson demonstrates elicitation: when a server processing a client request asks for additional structured input (for example, a confirmation) before it can complete the operation. The flow is:
  1. Client issues a request for a tool/endpoint.
  2. Server responds with an input_required response describing the requested inputs.
  3. Client gathers the requested input (UI dialog, automated responder, etc.).
  4. Client resends the original request with the supplied input.
  5. Server finishes processing and returns a complete result.
The example below uses a simple “hold shipment” tool inside a shipment-tracker server. First, the client issues a tool call (example request URL shown):
The server does not immediately place the hold — it asks for confirmation. The client presents that request to the user as a modal dialog:
A web app screenshot showing a modal titled "Elicitation Request" asking "Place a hold on PL-4417?" with a confirm checkbox, a yellow warning box about trusting the server, and Cancel / Decline / Submit buttons. The underlying page appears to be a "shipment-tracker" tool interface.
That modal is the client-side rendering of the server’s “input required” response. Instead of returning a final result, the server returns a structured request that describes exactly what input it needs (in this case, a boolean confirmation). The client UI renders the form/modal, collects the user’s input, and resubmits the original call including the user’s answer. Example of the server’s initial (trimmed) response that requests input:
Notes about the response:
  • The resultType is input_required — the server is intentionally pausing the operation until input is supplied.
  • The inputRequests map identifies named input requests (here, confirm) and includes a requestedSchema (JSON Schema) describing the expected payload.
  • SDKs may use snake_case field names (e.g., input_requests) that serialize to the wire-format camelCase shown above (inputRequests).
Once the client shows the dialog and the user confirms, the client resends the same tool call with the user’s response attached. The server then completes the operation and returns a final complete result. Example final response after confirmation:
This is a multi-round extension of the same logical request: client -> server (input_required) -> client (gathers input) -> server (complete). Quick reference table
Elicitation lets a server pause processing and ask for additional structured input mid-request. Clients should render the inputRequests (UI form/dialog or automated handler), collect the requested input, and resend the same logical call with the inputs attached. The server can then finish processing and return a complete result.
Server-side example (compact Python) Below is a minimal server-side example that implements the elicitation behavior. The tool hold_shipment returns an InputRequiredResult on the first call (asking for confirmation) and the final string result once the confirmation arrives.
Key implementation details
  • On the first invocation, ctx.input_responses is None. The tool responds with an InputRequiredResult describing the requested input and JSON Schema for validation.
  • The client displays the corresponding UI (form/modal) to the human operator or runs an automated responder, then resubmits the original tool call with the answer attached under input_responses (wire name: inputResponses).
  • The server inspects the submitted answer and returns a final complete result (or an alternate message/error) based on the input.
Best practices and considerations
  • Use structured schemas (JSON Schema) in requestedSchema to make client rendering and validation deterministic.
  • Include a human-friendly message to explain why the input is needed.
  • Keep method and params consistent so clients can handle generic elicitation flows.
  • Ensure the client re-sends the original logical request (same tool/parameters) with the input_responses included, rather than starting a separate unrelated request.
Further reading
  • JSON Schema: https://json-schema.org/
  • Model Context Protocol (MCP) patterns and toolkit (search vendor or repo-specific docs for your MCP implementation)

Watch Video