WebMCP
The declarative API: tools from forms you already have
Chrome documents WebMCP form annotations. Review the attributes, keep the form usable and test validation and submission in your intended browser client.
Last reviewed 30 September 2026
Most of what an agent wants to do on an ordinary website is already expressed as a form. Search, contact, quote request, booking, filter, newsletter — each is a set of named fields with types and a submit target. The declarative half of WebMCP exists on the observation that this is already a tool definition, badly disguised.
The idea: annotate the form, and the browser synthesises the tool. Field names become schema properties, input types become JSON Schema types, labels become property descriptions, and the form's own submission becomes the handler. No JavaScript, no separate definition to keep in sync.
Chrome's current documentation names toolname and tooldescription on the form, and optional toolparamdescription on fields. Submission behavior must be tested separately. This article's ordinary form example below illustrates semantics; it does not register a WebMCP tool by itself.
What you can do today, which is most of the value
Here is the useful part: almost all of the work the declarative API will ask of you is work you should do anyway, and it pays off immediately with agents that do not implement WebMCP at all.
When the browser derives a schema from your form, it derives it from labels, names, types and autocomplete tokens. A form with <input name="field_7"> and no label produces a useless tool. The same form done properly produces a good one — and in the meantime it is also the form that a DOM-reading agent, a screen reader and a password manager can all handle.
<form action="/api/quote" method="post">
<label for="service">What do you need?</label>
<select id="service" name="service" required>
<option value="webmcp-implementation">WebMCP implementation</option>
<option value="agent-readiness-audit">Agent readiness audit</option>
<option value="monitoring">Ongoing monitoring</option>
</select>
<label for="email">Work email</label>
<input id="email" name="email" type="email"
autocomplete="email" required
aria-describedby="email-hint">
<p id="email-hint">We reply within one business day.</p>
<label for="volume">Monthly page views</label>
<input id="volume" name="volume" type="number"
min="0" step="1000" inputmode="numeric">
<button type="submit">Request a quote</button>
</form>Read that markup as a schema and the mapping is obvious:
| Markup | Becomes |
|---|---|
name attribute | Property key |
type / inputmode | Property type |
<label> text | Property description |
<option> values | enum constraint |
required | Entry in the required list |
min, max, step, pattern | Numeric and string constraints |
aria-describedby text | Additional guidance for the agent |
action and method | Where the invocation goes |
Every row of that table is also a row in our forms guide, because it is the same work. Do it, and adopting the declarative API later is an annotation pass rather than a rewrite.
When to prefer the imperative API anyway
- Anything multi-step. A form is one submission. Comparing two products, or checking compatibility before adding to a cart, is a conversation — that wants handlers.
- Anything that reads. Forms are built to write. A tool that returns the current cart, or a specification sheet, has no natural form to be derived from.
- Anything conditional. Tool lists that change with login state are a lifecycle concern, and lifecycle lives in JavaScript with an
AbortSignal. - Anything that needs annotations.
readOnlyHintand confirmation before a destructive call are properties of the tool definition.
A sensible sequence
- Fix the form semantics now. Labels, names, types, autocomplete tokens,
aria-describedby. This pays off with every agent that exists today. - Register your two or three highest-value read actions imperatively, with
readOnlyHint: true. - Compare Chrome's documented attributes with the browser build and assistant you intend to use, then test the annotated form and its actual submission behavior.
- Only then consider write tools, and put a confirmation step in front of each one.
Our scanner reports declarative annotations when it finds them and excludes the check entirely when a page serves no forms — a page with nothing to annotate is not failing at annotation. The forms check, which grades labels, names, types and autocomplete coverage, applies regardless and is worth 7 points.
Sources
Source references · article reviewed 30 September 2026
- github.com/webmachinelearning/webmcp — Explainer repository, imperative and declarative API
- webmachinelearning.github.io/webmcp — W3C Web Machine Learning Community Group draft — WebIDL, annotations, permissions policy
- developer.chrome.com/docs/ai/webmcp — Origin trial, flags, permissions policy directive
- Chrome — Declarative API — Documented form and field annotations
- html.spec.whatwg.org — autofill — The autocomplete token list a synthesised schema can lean on
Keep reading
Check your own site against this
The Agent Readiness Score measures exactly what this article describes, and shows the evidence behind every finding.
Run the check →