WebMCP: Stop Making Agents Click
Loading like and share buttons...
#webmcp#ai-agents#browser-automation#playwright

WebMCP: Stop Making Agents Click

Have you ever watched an AI agent click through your web page and fumble a date picker? WebMCP fixes that: your page registers a tool with a name, a description and its inputs, and the agent lists and calls it instead of clicking. By the end you will add your first tool to your page.

Vibki AI
Vibki AI
Nov 24•6 min read

Get new posts in your inbox. No spam, unsubscribe any time.

Have you ever watched an AI agent click through your web page and fumble a date picker? WebMCP fixes that: your page registers a tool with a name, a description and its inputs, and the agent lists and calls it instead of clicking. By the end you will add your first tool to your page.

Doesn't an agent already have Playwright for this?

Yes, and it works. Say we want to create a ticket on our ticket page with the title "Fix checkout timeout", a high priority, and a due date of 2027-01-15. An agent can do it by driving a real browser with Playwright (a browser automation library), or by crawling the page and reading its HTML. A browser-automation tool did it in 10 calls, but only because we knew each selector, the text address of a page element.

The price is the loop: a page is built for eyes, so we watch the agent read, click and read again, since every click changes the page. The date picker opens on November 2026 and the due date is January 2027, so it hunts for "next month" twice. Like opening every cupboard to find dinner, it works but slowly, and one renamed class breaks the loop.

What is WebMCP and what does it give the agent?

Is there a shorter path? Yes, says the W3C Web Machine Learning Community Group's WebMCP proposal. Your page registers a tool: a name, a short description and its inputs as a JSON Schema, a JSON description of the fields. The tool list works like a menu: the agent calls one, which is tool calling, and the page's own code runs while you watch the ticket appear. As of 2026-11-21, the W3C group's implementation status page says Chrome 149 and Edge 150 run it in origin trials, early tests a site opts into.

You say three things:

  1. To your coding agent: "add a tool that creates a ticket, reuse what the button calls."
  2. To your coding agent, for a plain form: "mark this form as a tool."
  3. To your browsing agent: "list the page's tools, call one, click only if none fits."

How does the agent find and call a tool?

First the agent asks the page what it offers with document.modelContext.getTools(). On our ticket page it gets one entry. Priority is an enum, a fixed list of allowed values, and dueDate is a "YYYY-MM-DD" string:

📄Text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ getTools() on ticket.html
[
  {
    "name": "create_ticket",
    "description": "Create a support ticket. dueDate is an ISO date, YYYY-MM-DD.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string"
        },
        "priority": {
          "type": "string",
          "enum": [
            "low",
...

Then it calls executeTool with the three values, and your page's own function runs and returns a string:

📄Text
1
2
$ executeTool(tool, {"title":"Fix checkout timeout","priority":"high","dueDate":"2027-01-15"})
"Created ticket \"Fix checkout timeout\" (high, due 2027-01-15)."

The date picker is never touched: the date goes in as text. In our run the same ticket costs one call to list and one to call, against ten calls:

📄Text
1
2
click path   10 calls   525 ms   observe, fill, select, click, observe, click, click, observe, click, click
tool path     2 calls    29 ms   list tools, call create_ticket

Do I write the tool myself, or does the agent?

That tool did not write itself, so you tell your coding agent to write it. We gave this prompt on a copy of the plain ticket page, the one with no tool yet:

📄Text
1
Add one WebMCP tool to this page for creating a ticket. Name it, give it a one-sentence description, take title, priority and dueDate, and call the function the Create button already calls. Then list the page's tools and call it once to check.

We watched the agent open the page, find addTicket, the function the form's submit handler calls, and reuse it. This is its report:

📄Text
1
2
3
4
5
6
7
8
Opened:  run-stage5/ticket-plain.html (copy of the plain page)
Found:   addTicket(title, priority, dueDate), called by the form's submit handler
Added:   registerTool "create_ticket", inputs title, priority (low, normal, high), dueDate (YYYY-MM-DD), execute calls addTicket
Diff:    15 lines added after the submit handler, nothing else changed
Listed:  1 tool, create_ticket (38 ms)
Called:  create_ticket {"title":"Fix checkout timeout","priority":"high","dueDate":"2027-01-15"} (11 ms)
Result:  Created ticket "Fix checkout timeout" (high, due 2027-01-15).
Errors:  0 console errors

There is a second kind for a plain form. Chrome for Developers WebMCP Declarative API page says you add toolname and tooldescription attributes to the form. When an agent calls that tool, the browser fills the form while you watch. The Chromium 157 browser we used listed 0 tools for such a form.

Where does WebMCP stop?

That empty tool list is the first limit. Is every click a tool? No. A tool lives only while your ticket page's tab is open. Like a menu, the list follows the page. Chrome for Developers WebMCP Imperative API page says a page removes a tool with an AbortSignal, a JavaScript cancel switch. The toolchange event then tells the agent that the list changed. Chrome for Developers Imperative API page also says a tool can mark itself consequential, meaning hard to undo, so agents ask first.

As of 2026-11-21, the W3C group's implementation status page says ChatGPT Desktop supports the feature, Brave's Leo chat assistant is expected to get it on 2027-01-05, and Firefox and Safari have only discussion threads. If you want a nightly ticket sync with no page open, use an MCP (Model Context Protocol) server, a backend an agent calls. The W3C group's proposal says WebMCP is meant to complement MCP, not replace it.

Conclusion

Can an agent just drive the ticket page with Playwright? Yes, but it opens every cupboard: creating "Fix checkout timeout, high, due 2027-01-15" took 10 calls, and a moved button breaks the run. A page that registers a WebMCP tool hands the agent a menu: it lists the tools, calls one, and clicks only when none fits. So tell your coding agent to add that tool to the form it fumbles most, count your browsing agent's calls, and keep watching the page, the human-in-the-loop habit. Next time, a page that attacks its agent.

Enjoyed this post?

Get the next one in your inbox. No spam, unsubscribe any time.

Comments

0 comments

Enter your comment. Maximum 2000 characters.

No comments yet. Be the first to share your thoughts!
Vibki logo wave icon
Vibki Surfing Bot
Vibki

Vibki is a developer blog where you will find tutorials on web development and AI integration. Each article is crafted with clear explanations, practical examples, and ready-to-use source code.

Talk to me
Copy email
LinkedIn
GitHub
Dev.to
Privacy Policy