# Expose your site's actions to AI agents using WebMCP

## Executive summary

This talk introduces WebMCP (Web Manifest Capabilities Protocol), a method for web sites to expose their functional capabilities directly to AI agents. Instead of relying on agents to interpret the UI like a human, developers can register tools using plain JavaScript, defining explicit inputs and outputs via a schema. This allows agents to perform direct tool calls (e.g., 'Download report CSV') rather than attempting button interactions, significantly improving reliability for automated agent workflows.

## Key takeaways

- Problem with Current AI Agent Interaction: AI agents often fail or go off course because they misinterpret the visual interface (UI) of a website, forcing them to interact like a human user.
- WebMCP Solution: Exposing Capabilities: WebMCP allows sites to explicitly expose what they can do. Developers register tools using plain JavaScript, providing a name, description, and function that performs the action.
- Reliable Agent Interaction via Schema: By defining explicit inputs and outputs (the schema), agents can bypass guesswork. They discover capabilities and execute direct tool calls, such as calling 'Download report CSV' directly.
- Alternative Exposure Methods: If JavaScript is not used, capabilities can be exposed by annotating supported HTML forms instead.

## Technical details

- WebMCP Implementation: Tools are registered using plain JavaScript and require defining a name, description, and an action function. The schema is critical for specifying explicit inputs and outputs.
- Agent Workflow Improvement: WebMCP shifts the paradigm from 'figure out what my page does' to 'here are the actions my site supports,' providing a reliable interface designed specifically for agents.
- Availability: The WebMCP origin trial is available starting with Chrome 149.

## Practical implications

- Web developers can significantly improve the reliability of their sites when interacting with AI agents by moving beyond UI interpretation.
- The implementation requires using plain JavaScript to define and register functional tools and their schemas.

## Topics

AI Agents, Web Development, JavaScript, Tool Calling, Browser APIs, Chrome 149, Learn more about WebMCP, Subscribe to Google for Developers

Source: https://www.youtube.com/watch?v=eiRlCVtzlm4
