WebMCP

In-page tools for AI agents

The SpecsLib comparator registers four JavaScript tools through the WebMCP proposal. A browser-integrated AI agent can call them to query the catalog, read spec sheets and compare models with structured data instead of scraping the page.

What WebMCP is

WebMCP is a web standard proposal from the W3C Web Machine Learning Community Group. A page registers JavaScript tools on document.modelContext, and agents built into the browser can call them, with the user's session and consent, without any remote MCP server.

How agents discover them

The tools are registered when the comparator page loads. An agent lists them with document.modelContext.getTools() and calls them like MCP tools: each one declares a name, an agent-oriented description and a JSON Schema for its parameters. Open the comparator

Status: origin trial

The API ships in Chrome 149+ under the WebMCP origin trial, and behind chrome://flags/#enable-webmcp-testing for local testing. The API surface is unstable. On browsers without support, registration is a silent no-op and the site works unchanged.

The four tools

Every tool is read-only and returns MCP-style content: a JSON payload with absolute specslib.com URLs.

search_mowers

Filters the catalog by garden constraints (area, slope, budget, wire-free) and returns the relevant models sorted, with key specs and the URL of each spec sheet.

search_mowers({
  minAreaM2?: number,        // lawn area the mower must be rated for
  maxSlopePercent?: number,  // steepest slope of the lawn, in percent
  maxBudgetEur?: number,     // maximum budget in euros
  wireFree?: boolean,        // true = wire-free only, false = wired only
  brand?: string,            // optional brand filter
  limit?: integer            // max results, default 5
})

get_mower_specs

Returns the full spec sheet for one model: specs, editorial summary, strengths, caveats and the spec sheet URL. Accepts a slug or a model name.

get_mower_specs({
  model: string  // catalog slug or brand + model name
})

compare_mowers

Compares two catalog models spec by spec and flags which values differ, with both spec sheet URLs.

compare_mowers({
  slugA: string,  // first catalog slug
  slugB: string   // second catalog slug
})

get_offer_url

Returns the absolute /go/ redirect URL to the current offer for a model, together with an affiliate disclosure note.

get_offer_url({
  slug: string  // catalog slug
})

Return format

Every call returns structured JSON text in MCP format (text content). URLs are absolute. get_offer_url always includes an affiliate disclosure: these links fund the site and never influence rankings or data.

Try it

Open the comparator in Chrome 149+ with the origin trial or the flag enabled, then inspect the registered tools with the Model Context Tool Inspector extension or via document.modelContext.getTools() in the console.