Lint a WebMCP registration
Lint one file, directory, or origin with the zero-dependency CLI in this public repository. Do not pay, sign, attach a wallet, or send telemetry. The command exit code is the result: 0 has no error, 1 has a failed check, and 2 means the arguments are not usable. Informational findings do not change the exit code. --strict fails the process on warnings. Info still does not fail under --strict.
This skill is skills/webmcp-lint in epistemedeus/x402-data-gateway-skills. npx skills add discovers skills/<name>/SKILL.md. It is not marked metadata.internal. Checker version 2.0.0. Mention filter v1.6.
The published call shape comes from the Web Machine Learning Community Group report at https://webmachinelearning.github.io/webmcp/ :
document.modelContext.registerTool({ name, description, inputSchema, annotations, execute }, { signal })
signal is an AbortSignal. Aborting it unregisters the tool. There is no unregisterTool method. The Community Group report is not a W3C Recommendation.
Three surfaces
- Canonical:
document.modelContext.registerTool(tool, { signal }). This is the call the checker requires. - Removed:
navigator.modelContext. Error. It was deprecated in Chrome 150 and removed in Chrome 152.0.7943.0. Chrome's note is https://developer.chrome.com/docs/ai/webmcp/updates . The migration usesdocument.modelContext.registerTooland aborts the controller onpagehide. - Emerging:
window.toolManager, includingglobalThis.toolManagerandself.toolManager. Informational. Chromium CL 8806158 (https://chromium-review.googlesource.com/c/chromium/src/+/8806158) adds it behind the experimental WebMCPv2 flag as a facade over the same per-document registry. It is distinct from canonicaldocument.modelContext. A cleanwindow.toolManager.registerToolcall is recorded aswindow.toolManagerand does not count as the canonical surface.
Real script versus docs mention (v1.6)
A registration is real only when registerTool( appears in JavaScript: an inline <script> (or type=module) or a bundled script file the checker reads. The same text in HTML documentation, a blog, or spec prose is a docs mention. That includes <pre>, <code>, and a <script> whose type is not JavaScript, such as text/plain.
Docs mentions do not create legacy errors, toolManager info, or schema errors. A documentation page whose only WebMCP text is prose does not get webmcp.missing_declaration. A product page that names x402, llms.txt, agent-card.json, mcp.json, or /.well-known/mcp, and has no real script registration, still gets that warning. A real <script> on a docs page is still linted.
Run the checker
From a checkout of this repository:
python3 actions/webmcp-lint/webmcp_lint.py --path page.html --json
python3 actions/webmcp-lint/webmcp_lint.py --url https://example.com --json
https://example.com is a placeholder. --url sends GET only, with X-Pilot-QA: 1 and a User-Agent that cites contact@neomorphic.io. That header marks a synthetic read-only probe. Do not count it as customer revenue, and do not count it as traffic from outside an agent. The command may GET up to 6 script URLs from that page. --path does not fetch script tags. Pass the script files yourself, or pass a directory of .html, .js, .jsx, .ts, and .tsx files.
A skill-only install copies this directory and does not copy actions/. Clone the repository, or use a git tree that contains actions/webmcp-lint, before running the command.
Rules
- On each canonical
document.modelContext.registerToolcall, and on each emergingwindow.toolManager.registerToolcall, requireinputSchema,annotations.readOnlyHint,annotations.consequentialHint,execute, and a second argument object withsignal. Boolean hints must be the literalstrueorfalse. An omitted hint is not the same as false (WebMCP #358). - Missing AbortSignal cleanup (WebMCP #346). The options object must carry
signal. When that signal iscontroller.signal, the same script must callcontroller.abort(), for example onpagehide. Aborting the signal unregisters the tool. - Error on
navigator.modelContextand print a migration that usesdocument.modelContext.registerTooland{ signal }. - Info on
window.toolManager. Do not treat it as a passing canonical registration. - On an agentic or MCP page with no executable surface, warn and print a 15 line starter. The finding names https://neomorphic.io/lab/conformance-index/ as optional reading. Do not fetch that index from this command unless you are already checking that URL yourself. The v1.6 filter suppresses this warning for docs-only prose.
- CSP or iframe sandbox warnings (WebMCP #389). Warn when a real registration is blocked by a
script-srcordefault-srcthat does not allow the inline script, when CSPsandboxomitsallow-scripts, when an iframesandboxomitsallow-scriptson a frame that is givenallow="tools"or whosesrcdocnames a tool API, and whenallow="tools"is delegated to a cross-origin or sandboxed iframe without CSPframe-ancestors. Samples inside<pre>or<code>are not live policy.
--agentic forces rule 5. --no-agentic skips it. --strict makes warnings fail the process. Info does not fail the process.
Install
Default-branch install, after this skill is on the default branch:
npx skills add epistemedeus/x402-data-gateway-skills --skill webmcp-lint --yes
This file can also be installed from a git tree URL for the branch that contains it. Do not claim a skills.sh directory page lists this skill until a fetch of that page shows it.
Boundaries
Contact is contact@neomorphic.io. The optional index, which this command does not modify:
