WebMCP loses important context when tools appear or disappear
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- javascript
- 领域
- api
调研方向
Read the related discussions #87, #96, #102, and #167 to understand how this proposal overlaps with existing work. The issue asks for a standard way to expose why a capability is unavailable while leaving authorization with the site, but does not identify files, tests, or a specific API. Done would mean a concrete design for preserving that context in the agent-visible tool surface.
由索引模型根据 Issue 内容生成。
描述
Problem
WebMCP currently gives agents a very simple view of capability state: a tool is either available or it is not.
That works for simple cases, but real applications have much richer state behind those tools.
A tool may become unavailable because:
- the user does not have permission
- their subscription does not include the feature
- they switched organizations or workspaces
- the current workflow is not ready for that action
- a resource is still processing
- the feature is temporarily unavailable
The site usually knows exactly why.
But when the site responds by simply registering or unregistering the tool, that meaning is lost. The agent only sees that the tool disappeared.
I think this creates a form of semantic context blindness.
Example
Imagine a reporting application.
A user asks an agent:
"Export this report."
Earlier, the agent could see:
export_report
The user then switches to another workspace where exports are not included in their plan.
The application unregisters export_report.
Now the agent only knows:
export_reportno longer exists.
It cannot tell whether:
- the user lacks permission
- the workspace plan does not support exports
- the report is not ready yet
- exports are temporarily unavailable
- or something else changed
Those situations should lead to very different agent behavior.
If the agent knew:
Export is unavailable because this workspace does not include report exports.
it could explain that to the user and continue helping with the parts of the workflow that are still available.
Developer-side problem
Leaving this entirely to application code also makes developers responsible for keeping the WebMCP tool registry synchronized with constantly changing application state. It also poses security concerns, due to constant changes that would need to happen, and coding changes that need to be maintained by a developer.
For example:
.js
if (canExport) {
registerTool(exportReport)
} else {
unregisterTool("export_report")
}
That seems simple until an application has dozens of tools and permissions can change because of login/logout, organization switching, subscription changes, role changes, feature flags, or async workflow state.
It becomes easy to:
- forget to remove a tool when access changes
- repeatedly register/unregister tools unnecessarily
- create races where an agent plans around a tool just as it disappears
- hide an entire tool even though only one operation inside it is restricted
Async/service-style tools make this even more noticeable.
For example, one manage_report tool might allow a user to view and edit a report, while exporting requires an additional permission. Removing the entire tool because export is unavailable would also hide the operations the user is still allowed to perform.
What I think is missing
I am not suggesting that WebMCP should become an OAuth or authorization system, or that the browser should understand every site’s permission model.
The site should remain responsible for authentication and authorization.
But it may be useful for WebMCP to have a standard way for a site to preserve some of the meaning behind capability changes instead of reducing everything to:
tool exists / tool does not exist
For example, a site could communicate that a capability is currently unavailable and optionally provide a reason such as:
- permission required
- entitlement required
- authentication required
- invalid current state
- temporarily unavailable
The exact API is less important to me than preserving that semantic context.
Related discussions
This seems related to:
- #87 — authentication/session context
- #96 — scopes and delegation context
- #102 — per-tool scopes
- #167 — dynamic tool updates and registration churn
I think this is slightly different from those discussions because the core problem is not specifically scopes.
The broader issue is that rich application capability state is currently being projected into a binary tool-presence signal, and useful context is lost between the site and the agent.
MCP naturally sits at the backend authorization boundary; WebMCP does not. WebMCP therefore needs a cleaner way to project backend capability state into the agent-visible tool surface, without reducing everything to syncing tools with register/unregister.
- 主要语言
- Bikeshed
- 星标
- 4.7k
- 派生
- 328
- 平均合并
- 1 天 21 小时
- 30 天内合并 PR
- 15
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
webmachinelearning/webmcp 的其他 Issue
-
Say how an agent should weigh annotations that the page wrote about itself可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
webmachinelearning/webmcp#353 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
webmachinelearning/webmcp#343 · 1 个 reaction ·
维护者通常 1 天内回复
-
Agenda+ i18n-tracker
难度 2/5 1-3 小时 新手友好度 75/100
webmachinelearning/webmcp#273 · 3 条评论 ·
维护者通常 1 天内回复
-
a11y-tracker Agenda+
难度 2/5 1-3 小时 新手友好度 67/100
webmachinelearning/webmcp#272 · 4 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
webmachinelearning/webmcp#234 · 5 条评论 ·
维护者通常 1 天内回复
查看 webmachinelearning/webmcp 的全部 Issue
相似的 Issue
-
`github-events` aborts the repository scan when a closed pull's API payload has a null `head`可能已有人在做 @renyamamoto2026-cmyk 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
zerocracy/judges-action#2823 ·
维护者通常 1 天内回复
-
cleanup hacktoberfest priority: low skill: good first issue testing
难度 2/5 1-3 小时 新手友好度 78/100
hyperledger-labs/fabric-smart-client#2197 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
corro-client drops the last byte of a response line that has no trailing newline可能已有人在做 @RaphaelFakhri 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 64/100
joinrpg/joinrpg-net#5752 ·
维护者通常 1 天内回复