Principle:AI QL Tuui MCP Elicitation
| Knowledge Sources | |
|---|---|
| Domains | MCP, User_Interaction, Elicitation |
| Last Updated | 2026-10-24 00:00 GMT |
Overview
A server-initiated request pattern where an MCP server asks the connected client to elicit structured input from the user (e.g. form data, confirmations) and return the response.
Description
MCP Elicitation allows an MCP server to request structured user input without implementing its own UI. The server sends an elicitation/elicite request with a schema describing the data it needs. The client (host application) receives this, presents a UI form to the user, collects the response, and returns it to the server. This enables servers to gather user-provided configuration, confirmations, or structured data without bundling a frontend. Like sampling, the request/response is asynchronous and uses a UUID-based correlation channel.
Usage
Use this principle when designing MCP servers that need to collect structured input from the user (API keys, preferences, confirmations), or when designing MCP clients that need to present elicitation forms for server requests.
Theoretical Basis
The elicitation roundtrip:
MCP Server → Client.setRequestHandler(ElicitRequestSchema):
1. Server calls elicitation/elicite with request schema
2. Client handler forwards to host application via IPC:
{ request, responseChannel: "msgElicitationTransferResult-{uuid}" }
3. Host application:
a. Listen for "msgElicitationTransferInvoke" events
b. Present elicitation UI form to user
c. Collect user response
4. Send response via window.mainApi.send(responseChannel, elicitationResponse)
5. Main process resolves Promise via ipcMain.once(responseChannel)
6. Return ElicitResponse (ElicitResult) to server
The ElicitRequest contains a schema describing the fields to collect. The ElicitResponse contains the user's input or a decline/cancel status.