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

How To Get Your Website Ready For AI Agents

That's not malice. That's just what the training data says. Your GEO work today is…

2 days ago

Two Truths and a Lie About Digital PR

DifferentiateCombine those two signals and you get a positioning idea: pitch Martinelli's as the original…

1 week ago

Demystifying Grounding Queries with Real Data

The Gemini (Vertex) API now gives limited access to grounding queries and returns the search…

2 weeks ago

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.…

3 weeks ago

Should We Stop Writing With AI?

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

4 weeks 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 month ago