Add declarative human-in-the-loop policy hints for tool execution
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 28/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- documentation
Research direction
Start with the proposal's ToolAnnotations schema and the registerTool example to understand the intended annotation. The work also needs resolution of the enum versus booleans, default behavior, read-only interaction, and normative guidance; completion requires an agreed schema plus minimal examples and non-normative safety guidance.
Written by the indexing model from the issue text.
Description
Problem
WebMCP tools have vastly different risk profiles (e.g., a read-only search vs. sending a payment or deleting data). Currently, there is no declarative way for a web application to communicate its expected Human-in-the-Loop (HITL) policy per tool.
Without a structured signal, User Agents (UAs) must infer risk from natural-language descriptions or tool names, leading to inconsistent UX or unsafe assumptions.
Proposal
Add an optional, advisory humanInTheLoopHint to ToolAnnotations.
enum ToolHumanInTheLoopPolicy {
"none", // Safe to run autonomously (e.g., read-only lookup)
"notify", // Run autonomously but notify user (e.g., temporary UI preference)
"review", // Requires preview/summary before finalizing (e.g., staging a draft)
"confirm" // Requires explicit approval (e.g., sending email, deleting a file)
};
dictionary ToolAnnotations {
boolean readOnlyHint = false;
boolean untrustedContentHint = false;
ToolHumanInTheLoopPolicy humanInTheLoopHint = "confirm";
};
Example Usage
document.modelContext.registerTool({
name: "email.createDraft",
title: "Create email draft",
inputSchema: { /* ... */ },
annotations: {
readOnlyHint: false,
humanInTheLoopHint: "review"
},
async execute(input) { return await createDraft(input); }
});
Why this matters
- UX Consistency: Provides a common vocabulary for tool-level expectations, enabling UAs to render standardized confirmation/review states.
- Advisory Nature: This does not replace UA safety frameworks. The UA can always ignore the hint or enforce a stricter policy (e.g., forcing a
confirmon sensitive actions even if the site requestsnone).
Open Questions
- Should this be a single enum or separate boolean hints (e.g.,
requiresConfirmationHint)? - What should the default value be? Should
readOnlyHint: trueimplicitly default to"none"? - Should high-risk categories (payments, external communication) have stricter normative guidance that overrides loose site hints?
Next Steps
If the working group is open to this direction, I can submit a PR adding this annotation schema, minimal examples, and non-normative safety guidance to the spec.
- Dominant language
- Bikeshed
- Stars
- 4.7k
- Forks
- 328
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from webmachinelearning/webmcp
-
Say how an agent should weigh annotations that the page wrote about itselfPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
webmachinelearning/webmcp#353 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
webmachinelearning/webmcp#343 · 1 reaction ·
Maintainers usually reply within 1 day
-
Agenda+ i18n-tracker
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
webmachinelearning/webmcp#273 · 3 comments ·
Maintainers usually reply within 1 day
-
a11y-tracker Agenda+
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
webmachinelearning/webmcp#272 · 4 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
webmachinelearning/webmcp#234 · 5 comments ·
Maintainers usually reply within 1 day
All issues in webmachinelearning/webmcp
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
NatLabRockies/OpenStudio-HPXML#2284 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ROCm/rocm-libraries#14018 ·
Maintainers usually reply within 2 days
-
area/kotlin
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Qiskit/documentation#5839 ·
Maintainers usually reply within 1 day