WebMCP Tool Reference
Documesh is an application powered by WebMCP. These are the exact
tools this website registers via
document.modelContext.registerTool() —
the contract any compatible agent discovers and operates when you open this site
in ChatGPT's in-app browser or Chrome with WebMCP enabled.
What is WebMCP?
WebMCP is an emerging open standard (W3C Web Machine Learning community group, developed with Microsoft and Google) that lets a website declare structured tools for AI agents. Instead of an agent scraping HTML and guessing, the page hands over a machine-readable tool list: names, descriptions, JSON Schemas. The agent reads the contract and calls tools directly — while the visual UI stays on screen for the human. Think of it as the difference between reading a building's floor plan and wandering the halls hoping to find the right room.
Connect an agent
Open documesh.dev in ChatGPT's in-app browser and ask naturally: "search the docs for edge function environment variables." WebMCP is supported out of the box — the agent finds and calls the tools.
Enable chrome://flags/#enable-webmcp-testing, restart, then open the site and converse with your WebMCP-compatible agent of choice.
Design principles
- 1.Risk-typed tools. Every tool declares its class —
answer(read-only),act(mutates app state),transact(guarded). All Documesh tools are read-only today. - 2.Provenance mandatory. Responses without
license,source_urlandlast_updatedfail at the schema level — attribution is structural, not optional. - 3.Honest abstention.
explain_errorlabels low-confidence results as "closest matches" and never presents a guess as the answer. - 4.One tool per intent. No near-duplicate tool spam — models lose accuracy on bloated tool lists, so the mesh keeps a minimal canonical surface.
Tools
search_docs_across
Search federated developer documentation across all mesh vendors. Returns ranked excerpts with version, license, and canonical source URL for every result.
{
"query": "edge functions environment variables",
"vendors": ["netlify", "vercel"], // optional filter
"limit": 5 // optional, default 5
}
{
"snapshot_date": "2026-08-30",
"results": [{
"vendor": "netlify", "version": "latest",
"title": "Environment variables at Netlify",
"section": "Build > Environment variables > Overview",
"excerpt_link": "https://docs.netlify.com/build/env/overview/",
"license": "Netlify Docs (agent-permitted via llms.txt)",
"last_updated": "2026-08-30", "relevance": 274.66
}]
}
explain_error
Given a log excerpt or error message, find the closest matching documentation sections across mesh vendors. Extracts error signatures (exception names, k8s reasons, errno codes, exit codes) and returns version-cited sections with an explicit disclaimer.
{
"log_excerpt": "Back-off restarting failed container. Error: CrashLoopBackOff",
"vendor": "kubernetes" // optional filter
}
{
"extracted_signatures": ["CrashLoopBackOff", "Error: CrashLoopBackOff…"],
"matches": [{
"vendor": "kubernetes",
"title": "How Pods handle problems with containers",
"source_url": "https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/",
"license": "CC-BY-4.0", "score": 252.4
}],
"disclaimer": "These are the closest documentation sections, not a diagnosis…"
}
list_vendors
List the documentation vendors in the mesh with their license and attribution requirements. Lets an agent verify provenance before citing.
{ "vendors": [{
"id": "cloudflare", "name": "Cloudflare Developers",
"license": "CC-BY-4.0",
"license_url": "https://github.com/cloudflare/cloudflare-docs/…/LICENSE",
"docs_origin": "developers.cloudflare.com (official llms.txt)",
"attribution_required": true
}, /* … 14 more */ ],
"snapshot_date": "2026-08-30" }
Vendor registry
All 15 sources, their legal basis, and ingestion interface. Full detail on the coverage page.
| Vendor | License | Interface |
|---|
Registration snippet
This is the actual pattern used on this site (simplified):
// app.html — registers Documesh capabilities with any visiting agent const ctx = document.modelContext; ctx.registerTool({ name: "search_docs_across", description: "Search federated developer documentation…", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query" }, vendors: { type: "array", description: "Optional vendor filter" }, limit: { type: "number", description: "Max results" } }, required: ["query"] }, execute: async (input) => { const data = await fetch(`/search?q=${input.query}`).then(r => r.json()); return data; // license + source + version on every result } });
Response contract
Every tool response satisfies these invariants — enforced by the indexer and API, verifiable by any agent:
license present on every resultsource_url → canonical vendor pagelast_updated dated snapshot