# My blog has tools now: WebMCP for browser agents

**URL:** https://andreskristensen.blog/posts/my-blog-has-tools-now-webmcp-for-browser-agents

![A closed notebook with a wrench, a magnifying glass and a ruler tucked under its elastic band.](https://cdn.sanity.io/images/i6gaeymf/production/86eebb8cc4d2b063cd7894a22c50aa06a1aaa99d-1024x1024.png)


---

**Summary:** The blog builds on its Markdown-first approach by adding WebMCP, a draft W3C technology that lets web pages expose structured tools to browser-based agents. Rather than forcing an agent to inspect pages, infer URLs, and construct requests, WebMCP provides a concise list of callable tools registered through `document.modelContext.registerTool()`. Chrome supports it experimentally through an origin trial beginning with version 149.

Every page on the blog offers three read-only tools: `list_posts`, which returns recent posts with optional category and limit filters; `get_post`, which retrieves a post’s full Markdown by slug; and `list_categories`, which lists categories and post counts. These tools simply fetch existing public Markdown endpoints, so the same information remains accessible without WebMCP.

Users can inspect and invoke the tools in Chrome DevTools under Application > WebMCP or query them from the console. Agents can also access them through Chrome DevTools MCP, while an inspector extension supports prompting with Gemini. However, current access depends on flags, experimental options, or an origin trial, and tools are visible only while a page is open. Keeping them as thin wrappers ensures the blog remains functional if WebMCP changes or disappears.

## From Markdown to tools

In my last post I got this blog from 68 to 100 on is-agentic.com, mostly by serving every page as Markdown. An agent can now read anything here, but it still has to work out which URLs to fetch and what to send.

WebMCP lets the page answer that itself. Instead of reading the page and guessing, an agent gets a short list of tools it can call.

## What WebMCP is

WebMCP is a draft from the W3C Web Machine Learning Community Group. A page registers tools with `document.modelContext.registerTool()`. Each tool has a name, a description, a JSON Schema for its input and a function that runs when an agent calls it.

It's not a standard yet. Chrome has an origin trial from Chrome 149, so I registered the blog and added the trial token to every page. My token runs until March 2027.

## The three tools on this blog

Every page registers three read-only tools:

- `list_posts`: published posts, newest first. It takes an optional category slug and a limit from 1 to 50.
- `get_post`: the full text of one post as Markdown, by its slug.
- `list_categories`: every category with its slug and how many posts it has.

The tools don't talk to Sanity. Each one fetches a Markdown URL the blog already serves: `/posts.md`, `/posts/<slug>.md` and the new `/categories.md`. Anything a tool returns is already public, and an agent without WebMCP gets the same data from those URLs, filters included.

All three are marked `readOnlyHint`, which tells the agent that calling them changes nothing.

## How to see the tools

Open any page here in Chrome 149 or later, open DevTools and go to Application, then WebMCP. Available Tools lists each tool's name and description the way an agent sees them. Invoked Tools logs every call with its input and output, and you can run a tool yourself with your own parameters.

You can also ask the page directly. In the console, `await document.modelContext.getTools()` returns the same list.

The trial token only works on my domain. To try WebMCP on localhost, turn on `chrome://flags/#enable-webmcp-testing`.

## How agents use them

An agent running in the browser calls the tools directly. A coding agent like Claude Code can get there through Chrome DevTools for agents, the chrome-devtools-mcp server. Start it with `--categoryExperimentalWebmcp` and it gains two tools, `list_webmcp_tools` and `execute_webmcp_tool`. That needs Chrome 150 or later with WebMCP turned on.

Chrome also points to a Model Context Tool Inspector extension, which lets you prompt an agent against a page's tools. It needs a Gemini API key.

The tools only exist while a page is open, so an agent can't see them before it visits. That's why llms.txt lists all three, with their inputs, next to the Markdown URLs.

## What doesn't work yet

Every way to call these tools today goes through a flag, an experimental option or an origin trial. Most visitors to this blog will never trigger one.

That's why I kept the tools thin. They wrap URLs any agent can already fetch, so if the trial ends or the API changes, nothing breaks. The blog stays readable as Markdown, and the tools are a shortcut for the agents that support them.