Agentic WebWebMCPagentic browsingstatic analysis

WebMCP Tool Validator

Inspect WebMCP declarative and imperative static source without executing JavaScript; runtime tools require actual browser observation.

Use it to inspect WebMCP static source separately from actual runtime-tool observation.

Inputs

WebMCP Tool Validator is one of 24 directly executable, read-only WebMCP diagnostics registered on the root page. It returns a structured result using the same canonical description in document.modelContext, tool pages, tools.json, well-known manifests, OpenAPI, and JSON-LD.

Example

Paste WebMCP markup or fetch page source for static evidence; active runtime tools remain not observed unless an explicit browser hook supplies them.

Tool metadata an agent can actually trust

WebMCP lets a page offer its capabilities to agents as named tools, and the metadata is the entire interface: an agent sees a name, a description, and parameter definitions — not your source code and not your intentions. Vague descriptions, unnamed parameters, or side-effect wording that hides a mutation behind a harmless verb do not merely look untidy; they cause an agent to call the wrong tool, with the wrong arguments, at the wrong moment, while a human approves the call based on the same misleading words.

This validator inspects declarative form metadata and statically attributable document.modelContext.registerTool calls without evaluating JavaScript or a DOM. Static source evidence is kept separate from actual runtime observation: active tools are reported only when a caller-provided browser hook really observes them.

Static preflight before an agent arrives

Paste the smallest fragment that reproduces the question: one form, one registration block, one component's markup. Static analysis has no execution context anyway, so surrounding boilerplate adds noise rather than signal. Fix the blunt problems first — missing tool names, descriptions that could describe anything, parameters without labels — because those defeat agents before any subtle issue matters.

Then distinguish errors from observability limits. Missing required names, descriptions, or execute handlers are structural errors; indirect schemas, aliases, object spreads, dynamic registration, and removal lifecycles may be impossible to prove statically and are reported as such. Nested JSON Schema constructs such as $ref, oneOf, anyOf, arrays, and enums are not rejected merely because they are complex.

What inspection can and cannot prove

Pasted HTML and JavaScript stay in the browser and are never executed; fetched source is also inspected statically. Comments and string literals are masked to avoid false detections, and unrelated registerTool methods are not treated as WebMCP. Static inspection cannot prove an active registration or call behavior. Runtime tools are reported only when actually observed by an explicit browser hook.

Frequently asked questions

Does the validator execute pasted JavaScript?

No. Pasted code is treated purely as text to search for registration patterns and metadata. Nothing is evaluated, and no network request results from pasting.

Does description quality decide validity?

No. A missing or empty required description is structural; keyword length or style is not a conformance gate. Any side-effect wording signal is informational and cannot prove runtime behavior.

Why do parameter labels matter so much?

Labels are how humans and agents map a field to an intent without guessing. An unlabeled parameter forces every caller to infer meaning from the variable name — and that inference is exactly what tool metadata exists to remove.

What counts as risky side-effect wording?

Descriptions that hide mutation behind neutral verbs — a delete presented as manage, a payment presented as confirm. The check flags wording where the action an agent would predict diverges from the action actually implied.

Which registration style should a page prefer?

The current proposal uses document.modelContext.registerTool. navigator.modelContext is treated only as a compatibility pattern, and aliases derived from either modelContext can be recognized without executing the source.

Can this validate every WebMCP runtime?

No. It is a static preflight for markup and recognizable registration hints. Runtime behavior, permission prompts, and actual call semantics need a live agent test — ideally after the static findings are already clean.