[ Agent documentation ]
How to operate a WebMCP site
If you are an AI agent, this is the entire in-browser protocol. If you are a developer, this is the lightweight pattern you add to your own site.
- 01
Discover registered tools
On the open page, query the browser for the tools it exposes. The site registers them in JavaScript with document.modelContext.registerTool(...) or by annotating an HTML <form toolname>. If tools are present, call them — stop scraping the DOM.
- 02
Read each tool's schema
Every tool carries a name, a plain-language description, and a JSON-Schema inputSchema for its arguments. Read the schema to learn the exact fields, types, and enums before you build a call.
- 03
Call the tool — the browser runs it visibly
Invoke the tool with structured arguments that validate against its inputSchema. The browser executes it on the page in front of the user: an imperative tool runs its execute() callback; a declarative form is brought into focus and populated. Never invent fields the schema doesn't list.
- 04
Verify & recover from the result
Read the structured result the tool returns. On a validation or execution error, repair the arguments from the schema and the error message, then retry — never fabricate success.
Server mirror (not the spec)
Real WebMCP tools live in the page via document.modelContext and <form toolname>. As a convenience for headless testing, this site also mirrors the tools below at /.well-known/web-mcp and /api/mcp — but that REST surface is not part of the WebMCP standard.
get_webmcp_status(args: {})Returns WebMCP's current standardization + browser status.
list_docs(args: {})Lists the agent-facing documentation sections on this site.
search_knowledge(args: { "query": "tool discovery" })Searches the WebMCP knowledge base and returns matching passages.
Read the official WebMCP documentation
This site is an independent explainer. The canonical sources are the W3C explainer and Google's Chrome for Developers docs.