No structured way to signal a tool's refusal, distinct from success or a schema-validation error
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript
- Lĩnh vực
- api
Hướng nghiên cứu
Start by reading the WebMCP spec sections that define execute() results and tool errors, then review the seven-comment discussion for existing proposals or objections. Work out whether a structured refusal outcome fits the spec’s result model and how callers should distinguish it from success and schema-validation failure; done means the issue reaches a decided, specified behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Filing this from real friction hit building three apps for the WebMCP Challenge (one of them, Consequence, is built specifically around this issue).
The situation
execute() returns { content: [{ type: "text", text }] } regardless of whether the tool succeeded, was refused on purpose, or failed. There's no structured field distinguishing "I did the thing" from "I'm declining to do the thing, on purpose, and here's why."
We needed this because some of our tools enforce a real permission boundary: an agent is allowed to fill most fields on a form, but a few (attestations, signatures) can only be set by a human. When an agent calls our answer_question tool on one of those fields, the tool needs to refuse, clearly and on purpose, not silently no-op and not throw a generic error.
What we did instead
We return a normal-shaped success result whose text is a plain-language refusal message ("Refused: this field requires the human's own action"), and rely on the calling agent to read and respect that text. It works, but it's a convention we invented, not something the spec gives any structure to. An agent framework has no principled way to tell "the tool succeeded and this is the answer" apart from "the tool declined and this is why" without parsing prose.
Why this seems worth a spec-level answer
- A refusal is a different kind of outcome than a normal result, and calling code (or a UI showing tool-call history, which several of our apps do) benefits from being able to render it differently without string-sniffing.
- It's different from a schema-validation failure (which the runtime already rejects before
executeeven runs) — this is a tool voluntarily declining a well-formed, schema-valid call, because of business logic the schema can't express. - Multiple entries in the awesome-webmcp list implement permission/authorization patterns where this would apply (ours included), so it's probably a recurring need, not a one-off.
Happy to be pointed at existing discussion if this has already been considered and rejected — didn't find one searching open issues.
- Ngôn ngữ chính
- Bikeshed
- Star
- 4.7k
- Fork
- 328
- Merge trung bình
- 2 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của webmachinelearning/webmcp
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 72/100
webmachinelearning/webmcp#360 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Say how an agent should weigh annotations that the page wrote about itselfCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
webmachinelearning/webmcp#353 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
webmachinelearning/webmcp#343 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Agenda+ i18n-tracker
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
webmachinelearning/webmcp#273 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
a11y-tracker Agenda+
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
webmachinelearning/webmcp#272 · 4 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của webmachinelearning/webmcp
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
peteonrails/voxtype#909 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
yunaremaia/agent-call-graph#43 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:cos-agents bug effort:low model:light plan planner:sonnet-5-5
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-ready area: scrape priority: p3 type: fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
schlessera/brain-kit#2498 ·
Maintainer thường phản hồi trong vòng 1 ngày