WebMCP tools
WebMCP lets a page declare structured tools that a browser agent can list and call, instead of inferring actions from screenshots and the DOM. I register four tools. In a browser without WebMCP nothing is registered, nothing is downloaded and nothing is logged.
Status
WebMCP is a W3C community-group proposal and still changes, so I treat it as experimental. Chrome documents an origin trial from version 149 and a local flag, chrome://flags/#enable-webmcp-testing. No stable release is documented. The API has already changed once: provideContext and clearContext were removed in March 2026, and I use neither.
Sources disagree on where the API lives. Chrome’s docs use document.modelContext and the original proposal used navigator.modelContext, so getModelContext checks both.
Where things live
src/lib/webmcp/holds everything.detect.tsfinds the model context,register.tsregisters tools with oneAbortController,tools.tsdefines the four tools, andresult.tsbuilds their results.src/modules/providers/WebMcpProvider.tsxmounts once in the root layout and renders nothing. It loadstools.tsonly when the API exists, so other browsers never download the content data.src/lib/resumeRequest/carries a request for the resume dialog from a tool toResumeDownload.
Keep the API behind these files. A rename or a new result shape then changes detect.ts or result.ts and nothing else.
Tools
Every tool answers from src/content/ only. None returns anything a page does not already show, and none writes.
list_roles
Input: none. Returns each role’s slug, title, company, start and end, newest first. Marked readOnlyHint.
get_role
Input: { slug: string }, a slug from list_roles. Returns the role’s description, highlights, sections, caseStudy (text I wrote) and page path. An unknown slug returns an error that lists the valid slugs. Marked readOnlyHint.
search_skills
Input: { query: string }. Matches like the skills search on the site: case-insensitive, against a skill’s name, group, stack and the technologies it covers. An empty or whitespace-only string returns every skill. A missing or non-string query returns an error result instead. Each match has key, name, stack, proficiency, description, roles (slugs of roles whose text mentions the skill) and page. Marked readOnlyHint.
request_resume
Input: none. Opens the resume request dialog for the person using the browser and returns a message saying they must submit it themselves. On /resume the dialog opens at once. From any other page the tool goes to /resume first and the dialog opens on arrival. A request that nothing picks up within five seconds is dropped, so a failed navigation cannot open the dialog on a later visit.
The tool never submits. The form needs a name, an email and a Turnstile token that only a person can supply. Marked consequentialHint.
Results
Each tool returns one text block, { content: [{ type: "text", text }] }, and sets isError on a failure. Chrome’s docs do not define the return shape. This one follows the type declarations other WebMCP libraries use.
Trying it
Turn on the flag above in Chrome, open any page, and read the tools from the console:
await document.modelContext.getTools();
await document.modelContext.executeTool(
(await document.modelContext.getTools()).find((tool) => tool.name === "list_roles"),
{}
);Security notes
The spec lists prompt injection and tool chaining as open issues. What I do about them:
- The content tools are read-only, and their text is mine, so a tool result carries no third-party content.
request_resumeis the only action. It stops at a form that a person completes.- Tools run on the page, visibly, and the
toolsPermissions Policy keeps them out of cross-origin iframes by default. - Nothing is returned beyond what the pages show.
An agent that chains these tools with tools from other sites is outside what I can control.