# Page tools and WebMCP

> Page tools follow the WebMCP draft standard, and tools you register with the browser work too.

WebMCP is a draft web standard, from the W3C Web Machine Learning Community Group, for the tools a website offers to AI agents. Page tools use its names, so the code you write for help.ai also fits a browser's own AI features.

| WebMCP | In help.ai |
| --- | --- |
| A tool: `name`, `title`, `description`, `inputSchema`, `annotations`, `execute` | The page tool object, unchanged |
| `registerTool(tool, { signal })` | `HelpAI('registerTool')`, `chat.registerTool()`, `useHelpAITool()` |
| `annotations.consequentialHint` | The visitor approves each call first |
| `annotations.readOnlyHint`, `untrustedContentHint` | Accepted; not used yet |
| `toolname`, `tooldescription`, `toolparamdescription`, `toolautosubmit` | A form as a tool |

## Tools you register with the browser

In a browser with WebMCP, your page can register tools with the browser itself, through `document.modelContext`. The widget offers those to the agent too, and runs them through the browser. Forms are the exception: the widget fills `toolname` forms itself, as in every other browser.

Browsers without WebMCP, which is most of them today, are unaffected: tools registered with the widget work everywhere.

## Try it in Chrome

1. Open `chrome://flags/#enable-experimental-web-platform-features`, set it to **Enabled** and relaunch Chrome.
2. Open a page with your widget, and in the DevTools console run:

```js
document.modelContext.registerTool({
  name: 'check_weather',
  description: "Get today's weather at the store. Use it whenever the visitor asks about the weather.",
  inputSchema: { type: 'object', properties: {} },
  execute: async () => ({ sky: 'sunny', celsius: 21 }),
});
```

3. Ask the chat "What's the weather at the store today?" The agent calls `check_weather` and answers with the result.

## When two tools share a name

The widget reads the browser's WebMCP tools, then your forms, then the widget's `tools` option, then `registerTool`. For a name in more than one place, the later one wins.
