[MCP] Elicitation

news/2026/1/22 14:53:22/文章来源:https://www.cnblogs.com/Answer1215/p/19517184
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.mzph.cn/news/1200509.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

医师资格证考试题库哪家强?这四款高分神器帮你精准突围

医师资格证考试题库哪家强?这四款高分神器帮你精准突围一、选对题库有多重要?医考生提分的底层逻辑 医师资格证考试的难度逐年攀升,让众多医考生倍感压力。2023 年,实践技能考试的通过率仅约 60%,而综合笔试更是低…

学生成绩学分制管理系统的设计与实现开题报告

学生成绩学分制管理系统的设计与实现开题报告 一、研究背景 随着高等教育改革的不断深化,学分制已成为我国高校主流的教学管理模式,其核心在于以学分为计量单位,允许学生在一定范围内自主选择课程、安排学习进度,注重培养学生的自…

【实战项目】 Web与区块链融合的内容溯源系统开发

运行效果:https://lunwen.yeel.cn/view.php?id=5935 Web与区块链融合的内容溯源系统开发摘要:随着互联网和区块链技术的快速发展,内容溯源成为维护网络信息安全的重要手段。本文针对现有内容溯源系统存在的问题,如…

Temu自养号怎么注册?2026最新注册指南

海外电商平台竞争日益加剧,许多卖家开始探索如何通过Temu自养号来提升产品的曝光率、优化搜索排名并增强店铺信誉。自养号不仅能有效解决传统的高昂成本,还能通过模拟真实用户行为,提高店铺的可信度和运营效率。在本文中,我们将深…

【实战项目】 基于PHP的动漫作品推广平台的分析与设计

运行效果:https://lunwen.yeel.cn/view.php?id=5937 基于PHP的动漫作品推广平台的分析与设计摘要:随着互联网技术的飞速发展,动漫产业逐渐成为我国文化产业的重要组成部分。为了更好地推广动漫作品,提高动漫产业的…

深入浅出:无线电台数码抄报操作完全指南与实践应用详解

引言 在信息通信技术飞速发展的今天,无线电通信依然是应急救援、军事通信、业余无线电爱好者社区中不可或缺的通信方式。其中,数码抄报作为一种重要的无线电通信方式,是指通过无线电发送和接收数字化信息的过程,它不同于传统的语…

基于大数据爬虫+Hadoop用户评论主题挖掘的旅游景点推荐系统开题报告

基于大数据爬虫Hadoop用户评论主题挖掘的旅游景点推荐系统开题报告 一、研究背景 随着数字经济的快速发展与文旅产业的深度融合,我国旅游行业进入数字化转型的关键阶段。据中国旅游研究院数据显示,近年来国内旅游市场规模持续扩大,在线旅游用…

2026国内最新出国留学项目top5推荐!广东等地优质本科留学服务平台权威榜单发布,多国留学模式助力学术深造

随着全球化教育趋势深化,中国学生对国际化人才培养的需求持续增长,本科阶段出国留学成为学历提升与视野拓展的重要路径。据教育部留学服务中心最新数据显示,2025年我国本科出国留学人数同比增长18.7%,但留学项目资…

使用 Docker / Docker Compose 部署 PdfDing —— 个人 PDF笔记

PdfDing 是一款开源的 PDF 文档管理与阅读工具,支持标签分类、全文检索、暗色主题等实用功能,非常适合用于搭建个人或小团队的 PDF 资料库。本文将手把手教你通过 两种主流方式 快速部署 PdfDing: 方式一:docker run(…

2026年口碑好的铜铸件厂家推荐,雪龙铜制品全流程质控有保障

在工业制造的精密齿轮中,铜铸件是支撑设备稳定运行的隐形基石,尤其在工程机械、冶金矿山、船舶动力等核心领域,其品质直接关乎整机的使用寿命与安全性能。面对市场上良莠不齐的铜铸件供应商,如何挑选兼具技术实力、…

盘点真空镀膜制造厂哪个值得选,广东森美纳米科技口碑出众

在精密制造与消费电子行业快速迭代的当下,真空镀膜技术作为提升产品性能与外观质感的核心工艺,其加工厂的选择直接关系到产品竞争力与市场口碑。面对市场上良莠不齐的真空镀膜服务,如何找到经验丰富、专业可靠的真空…

【开题答辩全过程】以 基于JavaEE的超市自助结算平台的开发为例,包含答辩的问题和答案

个人简介 一名14年经验的资深毕设内行人,语言擅长Java、php、微信小程序、Python、Golang、安卓Android等 开发项目包括大数据、深度学习、网站、小程序、安卓、算法。平常会做一些项目定制化开发、代码讲解、答辩教学、文档编写、也懂一些降重方面的技巧。 感谢大家…

林芝市英语雅思培训辅导机构推荐,2026权威出国雅思课程中心学校口碑排行榜

经教育部教育考试院备案、全国雅思教学质量评估中心独家指导,参照《2025-2026中国大陆雅思备考趋势白皮书》核心指标,结合林芝市巴宜区、工布江达县、米林县、朗县等区县9200份考生调研问卷、102家教育机构实测及跨区…

合肥艾灸养生机构哪家好,口碑排名来参考

2026年健康消费市场持续升级,艾灸养生作为中医传统养生与现代健康需求结合的核心领域,已成为产后女性、职场人群等关注健康人群的重要选择。无论是体质调理、痛症缓解还是日常养生,优质的艾灸养生实力馆、正规馆与机…

查询域名信息前,先搞清楚这几个核心数据

在进行域名交易、投资或代购之前,很多人都会先查询域名信息。但现实中,不少人查是查了,却不知道哪些数据才是真正有价值的,结果依然判断失误。其实,域名信息查询并不是看得越多越好,而是要抓住几个核心数据…

后端开发转网安?我劝你别折腾,我就干过!

现在网上铺天盖地的说后端开发太卷了,网安赛道才是转行的出路,情况真的是这样吗?**我真干过,我来说说过来人的真实情况,一般人我劝你还是算了吧。我是软件工程的,毕业后在杭州干了3年后端开发,后…

‌震惊!测试经理的晋升面试,90%人输在软技能:一名测试工程师的晋升突围指南

技术过硬≠能当经理,软技能是晋升的“隐形门槛”‌ 在软件测试领域,技术能力是入场券,但软技能才是晋升测试经理的“生死线”。 根据ISTQB高级测试经理认证框架、中国软件评测中心调研及多家头部企业晋升案例分析,‌超过90%技术能…

【收藏必备】大模型应用落地指南:从Prompt到Multi-Agent的技术演进之路

本文详解大语言模型应用落地的四大演进阶段:Prompt、Chain编排、Agent和Multi-Agent。从最初的手动提示词工程,到固定流程编排,再到LLM自主规划,最后到多智能体协作,展示了自动化程度不断提升的过程。各阶段均有其目标…

铜铸件优质供应商哪家好,扬州雪龙铜制品值得选吗?

一、基础认知篇 问题1:什么是铜铸件优质供应商?如何判断一家企业是否符合标准? 铜铸件优质供应商是指在铜铸件生产领域具备稳定的品质管控能力、丰富的技术经验、高效的定制响应机制,且能为客户提供全生命周期服务…

【开题答辩全过程】以 基于Java Web的足球门票销售系统设计与实现为例,包含答辩的问题和答案

个人简介 一名14年经验的资深毕设内行人,语言擅长Java、php、微信小程序、Python、Golang、安卓Android等 开发项目包括大数据、深度学习、网站、小程序、安卓、算法。平常会做一些项目定制化开发、代码讲解、答辩教学、文档编写、也懂一些降重方面的技巧。 感谢大家…