Skip to content
Back to blog

MCP Elicitation: How AI Agents Ask Users for Input Mid-Task

Learn how MCP elicitation requests user input during a tool call, which clients can handle it, and how to validate responses in an xmcp server.

Most MCP tool calls are simple: the AI client calls a tool, the server runs it, the result comes back. But some tools need clarification mid-execution — information the AI doesn't have and can't infer. Elicitation is the MCP primitive that handles this case.

What elicitation is

Elicitation lets your MCP server pause a tool call and send a structured question directly to the user, bypassing the AI model entirely. The user answers, the answer goes back to your tool, and execution continues.

The key difference from ordinary tool output: elicitation is a server-to-user request, not a server-to-model response. The client controls presentation and what reaches model context; elicitation is not a guarantee that answers stay hidden from the model.

The flow

Text

Without elicitation, your only option is to return an error or partial result and let the AI ask a follow-up question naturally. That works for simple cases but adds conversational round-trips and lets the AI rephrase the question in ways that may confuse the user.

When to use elicitation

Elicitation is the right primitive when:

  • The tool needs input that the AI provably doesn't have — a choice between options or clarification that requires human judgment
  • You need structured input — a form with typed fields, not a free-text response parsed by the AI
  • You want to bypass the AI's interpretation — asking the user directly avoids the model paraphrasing or misinterpreting the question

Common examples:

  • Confirming a destructive action ("Delete all records for customer X?")
  • Opening a secure external flow when credentials are required; never request passwords or access tokens in an elicitation form
  • Choosing between ambiguous options when the AI doesn't have enough context to decide

When not to use elicitation

Elicitation adds latency and requires the MCP client to support it (not all clients do yet). For cases where the AI can reasonably ask the question itself through the conversation, that's simpler and more widely supported.

Also avoid elicitation for information the AI already has or can infer from context — it breaks the flow without adding value.

Client support

Elicitation requires the MCP client to implement the elicitation/create method. As of mid-2026, support is shipping across major clients but is not yet universal. Your server should handle the case where the client doesn't support elicitation — either by degrading gracefully (returning a prompt to the AI) or by returning a clear error.

Check the client's advertised capabilities during initialization. Form and URL modes have different requirements; follow the elicitation specification. In stateless HTTP, do not recover client capabilities from a hidden session cache.

Elicitation vs prompts

Both elicitation and MCP prompts involve structured user interaction, but they're different:

ElicitationPrompts
Triggered byYour tool, mid-executionThe user, before execution
Who sees itUser-facing UI controlled by the clientThe AI model (as input)
PurposeGather specific input to continue a taskGive the user a structured way to start a task

Prompts are for starting a task. Elicitation is for unblocking a task already in progress.

Next steps

One framework to rule them all