02 / WebMCP · experimental
Your forms and buttons, as tools.
A site says which of its forms, live loads, clicks and island acts are tools. When a person turns tools on and the @culmjs/webmcp plug-in is listed, the build adds a script that registers them with the browser.
Where this is proved, and where not
Experimental. Proved only in Chromium launched with the WebMCP testing flag (HeadlessChrome 156). No trial token has been tried. Safari and Firefox were not run. A browser without document.modelContext gets an ordinary page, and nothing measures whether the tools help a visiting agent.
From a declaration to a call.
Two agents take part: one that authors the site, and one that visits it. A person stands between them, and turns the tools on.
Agent
such as Claude Opus: one authors, one visits
Person
the owner, then a visitor
Culm
checks, then compiles
Browser
the page and its tool script
01
Agent
Declares a tool on a form
An authoring agent marks a form, a live load, a click or an island act.
"tool": {"name":"book_table","description":"Book a table","confirm":"visitor"}02
Culm
Checks the declaration
One origin, a unique name, a plain-text description, every field described. Refused on a form with a password field.
INVALID_NODE · or POLICY_VIOLATION, with a path03
Person
Turns tools on
Only a person, in a terminal: it lists every tool, then asks for the site's name, typed.
$ culm agents on04
Culm
Builds the pages
The tool table and the script go only on pages with a drawn tool.
<script defer src="/_culm/agent.js" integrity="…">05
Browser
Registers the visible tools
Only in a browser that has document.modelContext. Any other browser gets an ordinary page.
document.modelContext ← book_table06
Agent
Calls the tool by name
A visiting agent sends the declared fields.
book_table({"date":"2026-12-06","guests":"2"})07
Browser
Acts as a visitor would
Fills the form and focuses it. A form that does not wait is checked and submitted.
set fields → checkValidity() → requestSubmit()08
Person
Sends it, when the form waits
A form declared confirm: "visitor" is filled, then the visitor presses send.
{"pending":"visitor"}09
Agent
Gets the result
The new state, a pending form, or the island's reply. A refusal says why.
{"state":"ready"} · {"ok":false,"reason":"invalid"}Culm calls no model. The product, or the person's agent host, calls it. "An agent such as Claude Opus" names a role in these diagrams: the flows are exercised by tests with scripted callers, and nothing here was measured with Claude Opus.
Declare it on the node.
A declaration is data in the site document. Without tools on and a listed plug-in, every built page is byte-identical with and without it.
{ "kind": "form", "id": "booking",
"tool": {
"name": "book_table",
"description": "Book a table for tonight",
"confirm": "visitor" } }name
1 to 128 characters: letters, digits, _, - and the full stop. Unique on the page.
description
Plain text, not empty, with no < and no >.
confirm
Optional, for a form only. "visitor" fills the form and waits for the person.
What can carry a tool.
Exactly one origin. Each field becomes a parameter, described by its description, label or placeholder.
Live form
One parameter per visible field its request sends.
send
Static form
One per visible field, by the name it posts under.
send
Live load
A node loaded by one firing node. Class read when it only reads, otherwise send.
read
send
Click
A trigger that sets, toggles, steps or scrolls, or opens or closes a layer. No parameters.
page
Island act
An act an in-page island declares, with its declared inputs.
Refused
A tool on or inside a form with a password field. A declaration inside a repeating node, or hidden on every layout.
What a call gives back.
The script does what the visitor's press does, so a live request is the one the page declares, made as the visitor.
Click
{ "state": … }, the new value of the state it changes, or {}.
Live form
Sets the fields, checks validity, calls requestSubmit(). Returns { "state": … }: ready, empty or error.
Static form
The same, then the page navigates: no result.
Form that waits
Sets the fields and focuses the submit button. Sends nothing. Returns { "pending": "visitor" }.
Island act
Whatever the island replies, copied through JSON.
Refusal
{ "ok": false, "reason": … }: invalid (nothing is sent), not-started, not-ready, or timeout after 10 seconds.
A person turns them on.
Declaring a tool is open to an agent. Turning tools on is the one guarded change.
culm agents on
Prints every declared tool and a count, then asks for the site's name, typed. Without a terminal it changes nothing.
culm check
Lists each page's tools: name, class, whether it waits for the visitor, description.
culm mcp
Refuses an agent that turns tools on, unless the project's culm.json allows it with the literal true.
Remote caller
A hosted server never reads that setting: a remote caller can never turn tools on.
Not prevented
Once tools are on, an agent can declare a send tool that submits without the visitor; culm check shows whether each one waits. An agent with a shell or with file access can turn tools on without the command. A send tool on a source that sends cookies acts with the visitor's session. There is no limit on tools per page or on description length.
The rest of Culm