当前位置: 首页 > news >正文

[MCP] Elicitation

Modern AI applications often need to collect structured input from users at key moments in a workflow. 
 
Elicitation in the Model Context Protocol (MCP) standardizes this process, allowing servers to request information from users through the client, using a well-defined schema and a secure, user-friendly interaction model.
 
Elicitation enables interactive workflows like confirming destructive actions, collecting additional details, or guiding users through multi-step forms by letting the server pause and ask the user for exactly what it needs, in a structured way.
 
Elicitation requests are always initiated by the server (so you need a persistent connection), but the client controls the user experience. The protocol does not mandate a specific UI, so clients can present prompts as dialogs, forms, or any interface that fits their platform.
 

Elicitation Human-in-the-Loop vs. Tool Call Human-in-the-Loop

When the user makes a prompt and the LLM decides to call a tool, the application should check with the user before calling the tool.

Elicitation is specifically designed for structured, mid-process interactions. Unlike general chat or form submissions, elicitation happens when the MCP server is actively processing a request and realizes it needs more information to complete the task effectively.

 

User Interaction Model

When an MCP server needs more information, it sends an elicitation/create request to the client, specifying:
  • message to display to the user (e.g., "What is your preferred delivery window?")
  • requestedSchema (using a restricted JSON Schema) describing the expected input (e.g., a string deliveryWindow field with enum options)
The client presents this to the user, who can:
  • Accept (provide the requested data)
  • Decline (explicitly refuse)
  • Cancel (dismiss without a choice)
The server must handle all three outcomes appropriately.
Elicitation is designed for trust and safety. Servers must not use it to request sensitive information. Clients should always make it clear which server is requesting input, and users should be able to review, modify, or decline any request.
 

Example: Pizza Order Customization

Imagine an online pizza ordering system. After a user selects their pizza and toppings, the server wants to know if they'd like to add a drink to their order. Instead of assuming or cluttering the main UI, the server uses elicitation:
  1. The user submits their pizza order.
  2. The server sends an elicitation/create request:
{"jsonrpc": "2.0","id": 1,"method": "elicitation/create","params": {"message": "Would you like to add a drink to your order?","requestedSchema": {"type": "object","properties": {"drink": {"type": "string","title": "Drink Selection","description": "Choose a drink to add to your order","enum": ["None", "Cola", "Lemonade", "Water"],"enumNames": ["No drink", "Cola", "Lemonade", "Water"]}},"required": ["drink"]}}
}

 

The client presents this to the user, who can:
  • Accept (provide the requested data)
  • Decline (explicitly refuse)
  • Cancel (dismiss without a choice)
Here's what the response from the client might look like:
 
{"jsonrpc": "2.0","id": 1,"result": {"action": "accept", // or "decline" or "cancel""content": {"drink": "Cola"}}
}
If the user selects a drink, it's added to the order. If they choose "None" or decline, the order proceeds without a drink.
For more details, see the MCP Elicitation Spec.
 
 

When to Use Elicitation

Elicitation is ideal for scenarios where:
  • Confirmation is needed for destructive or irreversible actions
  • Additional context would improve the quality of the response
  • User preferences need to be clarified mid-process
  • Multi-step workflows require intermediate user input

Don't use elicitation for information that could have been provided in the initial prompt. Elicitation should only be used when the server genuinely needs more information to complete the current task effectively.

 

  • Use clear, concise messages for elicitation prompts.
  • Design schemas with only the fields you truly need (avoid requesting sensitive info).
  • Always handle accept, decline, and cancel actions.
  • Check client capabilities before attempting elicitation.
  • Use elicitation sparingly - it should enhance, not interrupt, the user experience.

 

References

  • 📜 MCP Elicitation Spec
  • 📜 Elicitation Concepts
  • 📜 MCP Elicitations: Standardizing Interactive AI Workflows

 

http://www.jsqmd.com/news/284408/

相关文章:

  • 学生成绩学分制管理系统的设计与实现开题报告
  • 【实战项目】 Web与区块链融合的内容溯源系统开发
  • Temu自养号怎么注册?2026最新注册指南
  • 【实战项目】 基于PHP的动漫作品推广平台的分析与设计
  • 深入浅出:无线电台数码抄报操作完全指南与实践应用详解
  • 基于大数据爬虫+Hadoop用户评论主题挖掘的旅游景点推荐系统开题报告
  • 2026国内最新出国留学项目top5推荐!广东等地优质本科留学服务平台权威榜单发布,多国留学模式助力学术深造
  • 使用 Docker / Docker Compose 部署 PdfDing —— 个人 PDF笔记
  • 2026年口碑好的铜铸件厂家推荐,雪龙铜制品全流程质控有保障
  • 林芝市英语雅思培训辅导机构推荐,2026权威出国雅思课程中心学校口碑排行榜
  • 盘点真空镀膜制造厂哪个值得选,广东森美纳米科技口碑出众
  • 合肥艾灸养生机构哪家好,口碑排名来参考
  • 后端开发转网安?我劝你别折腾,我就干过!
  • 【开题答辩全过程】以 基于JavaEE的超市自助结算平台的开发为例,包含答辩的问题和答案
  • 查询域名信息前,先搞清楚这几个核心数据
  • ‌震惊!测试经理的晋升面试,90%人输在软技能:一名测试工程师的晋升突围指南
  • 【收藏必备】大模型应用落地指南:从Prompt到Multi-Agent的技术演进之路
  • 铜铸件优质供应商哪家好,扬州雪龙铜制品值得选吗?
  • 【开题答辩全过程】以 基于Java Web的足球门票销售系统设计与实现为例,包含答辩的问题和答案
  • 升降器专业厂家怎么选择,排名来帮你解答
  • 2026年广州专业工作服定制公司排名,哪家实力雄厚
  • 收藏级|Java开发者AI大模型转型全攻略:保Java攻AI,筑牢AI时代竞争力
  • 【实战项目】 基于Swing的学生考勤管理系统
  • JVM 为什么能跨平台?JIT 凭什么“越跑越快”?——用几个例子把核心讲透
  • paperzz 毕业论文:搞定本科论文的智能「通关秘籍」
  • 收藏!AI就业黄金三年攻略:从岗位选择到入局路径,程序员小白必看
  • 硕士毕业通关秘籍:paperzz 毕业论文智能写作工具,让学术告别焦虑
  • 【基于dq控制算法的并联有源滤波器】分流有源滤波器的仿真电路可以减轻谐波和无功功率附simulink仿真
  • 硕士毕业通关密码:paperzz 毕业论文功能,重构学术写作新范式
  • 输入电影/书籍名称,自动生成精简版剧情梗概,提取核心人物和主题,帮快速判断是否想看/读。