Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Implement WebMCP in web projects — add browser-native structured tools for AI agents using imperative JS or declarative HTML APIs. Full lifecycle from setup through testing and optimization.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -14% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -35% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -30% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -16% | 0% |
<essential_principles>
WebMCP is a browser-native standard that exposes structured tools for AI agents on websites. Instead of screen-scraping, agents interact through typed JavaScript APIs and HTML annotations.
Two APIs:
window.navigator.modelContext — register tools via JavaScripttoolname/tooldescription attributes on <form> elementsPrerequisites: Chrome 146.0.7672.0+, chrome://flags/#enable-webmcp-testing enabled.
Core principles that always apply:
</essential_principles>
<intake> What would you like to do?
Wait for response before proceeding. </intake>
<routing> | Response | Workflow | |----------|----------| | 1, "setup", "integrate", "install", "start" | workflows/setup-webmcp.md | | 2, "imperative", "javascript", "js", "register", "programmatic" | workflows/add-imperative-tool.md | | 3, "declarative", "html", "form", "annotate" | workflows/add-declarative-tool.md | | 4, "debug", "fix", "broken", "not working", "error" | workflows/debug-webmcp.md | | 5, "audit", "review", "check", "best practices" | workflows/audit-webmcp.md | | 6, "test", "verify", "inspect" | workflows/test-webmcp.md | | 7, other | Clarify, then select workflow or references |
After reading the workflow, follow it exactly. </routing>
<reference_index>
All in references/:
APIs: imperative-api.md, declarative-api.md Design: tool-design.md Events: events-and-css.md Quality: testing.md, anti-patterns.md
</reference_index>
<workflows_index>
All in workflows/:
| Workflow | Purpose | |----------|---------| | setup-webmcp.md | Initial WebMCP integration into a project | | add-imperative-tool.md | Register tools via JavaScript API | | add-declarative-tool.md | Annotate HTML forms as WebMCP tools | | debug-webmcp.md | Diagnose and fix WebMCP issues | | audit-webmcp.md | Review implementation against best practices | | test-webmcp.md | Test tools with inspector extension and agents |
</workflows_index>
<templates_index>
All in templates/:
| Template | Purpose | |----------|---------| | imperative-tool.md | Scaffolding for JS-registered tools | | declarative-form.md | Scaffolding for HTML form-based tools |
</templates_index>
<verification_loop>
After every WebMCP change:
navigator.modelContext exists (Chrome flag enabled?)Report to user:
</verification_loop>
Other measured skills in the registry, with their headline benchmark lift.