In short, an agent comes to your website, discovers what WebMCP tools you offer, reads what each one does, and calls the one that fits the task.
There are two ways to set this up: HTML for forms or JavaScript for more complex uses.
Remember, these tools only work while the page is open; there’s no headless or background mode, and the browser has to keep running.
The declarative API is the easier implementation, meant for actions that already live in a form. For example, a reservation, signup, or contact request.
To implement this, you simply need to add a couple of attributes to the form you already have:
From there, the browser turns the form into a tool. By default, only your own site can use it.
To see the declarative API in action, I loaded Google’s Le Petit Bistro demo with the Model Context Tool Inspector open. It’s a Chrome extension that lists the tools a page has registered and lets you enter a prompt and watch its Gemini-powered test agent call them.
Just a heads up, you’ll need a Gemini API key for this (you can use the free tier).
The demo is a restaurant reservation page with one booking form. The fields include name, phone number, date and time, etc.
Sure enough, the form showed up in the Inspector as a registered tool, complete with its schema. The panel shows exactly which WebMCP tools an agent can see on a site.
If you liked What Is WebMCP? How to Prepare Your Website to Serve AI Agents by Matt Hollingshead Then you'll love Miami SEO Expert
GBP category: not what's technically accurate, but what's driving discovery in this market right now.…
Claneo’s 2025 State of Search study supports this. Search patterns vary by intent and age…
The SERP has turned into a crowded billboard of ads, AI features, and rich results.…
Workflow 3: Competitive analysis with chained agentsCompetitive analysis is one of my favorite AI use…
So how do I optimize my websites for agentic AI to make sure that it…
Once we move from topics to questions, whether in organic search or LLMs, we naturally…