Categories: BLOG2

What Is WebMCP? How to Prepare Your Website to Serve AI Agents

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.

Declarative API (HTML)

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:

  • toolname gives the tool a name
  • tooldescription explains what it does
  • toolparamdescription, optional, and tells the agent what that field expects

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

Matt Hollingshead

Share
Published by
Matt Hollingshead

Recent Posts

Local SEO That Actually Works: Some Assembly Required (AI Not Included)

GBP category: not what's technically accurate, but what's driving discovery in this market right now.…

2 days ago

Should We Stop Writing With AI?

Claneo’s 2025 State of Search study supports this. Search patterns vary by intent and age…

1 week ago

Announcing the Final Batch of Speakers for MozCon London

The SERP has turned into a crowded billboard of ads, AI features, and rich results.…

1 week ago

5 AI Workflows for Local SEO

Workflow 3: Competitive analysis with chained agentsCompetitive analysis is one of my favorite AI use…

2 weeks ago

The SEO’s Guide to Agentic Commerce — Whiteboard Friday

So how do I optimize my websites for agentic AI to make sure that it…

3 weeks ago

What 50k Query Fan-Outs Reveal About Brands (+ Free Data!)

Once we move from topics to questions, whether in organic search or LLMs, we naturally…

3 weeks ago