> Documentation index: https://developer.chrome.com/docs/ai/webmcp/llms.txt

![François Beaufort](https://web.dev/images/authors/beaufortfrancois.jpg) François Beaufort [GitHub](https://github.com/beaufortfrancois)

<br />


Published: November 26, 2026

<br />

| Explainer | Web | Extensions | Chrome Status | Intent |
|---|---|---|---|---|
| [GitHub](https://github.com/webmachinelearning/webmcp) | [![Origin trial](https://developer.chrome.com/static/images/experiment.svg) Origin trial](https://developer.chrome.com/origintrials/#/register_trial/4163014905550602241) |   | [View](https://chromestatus.com/feature/5117755740913664) | [Intent to Experiment](https://groups.google.com/a/chromium.org/g/blink-dev/c/gmYffo5WOE8/m/OJxuQRP3AAAJ) |

Follow this page to track API additions, behavior changes, and breaking changes
to [WebMCP](https://developer.chrome.com/docs/ai/webmcp.md.txt) across Chrome releases.

Code examples in earlier releases reflect the API shape at the time of each
change. Refer to the [Imperative API](https://developer.chrome.com/docs/ai/webmcp/imperative-api.md.txt) and
[Declarative API](https://developer.chrome.com/docs/ai/webmcp/declarative-api.md.txt) documentation for the latest
usage.

## Chrome 160

### New Tool interface replaces RegisteredTool dictionary

Following [PR #348](https://github.com/webmachinelearning/webmcp/pull/348), the
objects returned by `getTools()` are now instances of a new `Tool` interface
instead of `RegisteredTool` dictionaries. In addition, the `window` member,
which exposes the window of the document that registered the tool, is now called
`source`. This change starts in
[Chrome 160.0.8173.0](https://chromiumdash.appspot.com/commit/8d7371ff0e6e38bea93b9ff2bb594fb2b788fdbe).

Each `Tool` returned by `getTools()` has a unique internal ID. `executeTool()`
refers to this ID to run the tool. This fixes several race conditions,
such as a tool being unregistered while it runs. It also prepares for running
tools registered by opaque origin documents and for future worker integration.

Because `Tool` is now an interface object, be aware of these additional
compatibility changes:

- When left empty, `inputSchema`, `outputSchema`, and `annotations` are now `null` instead of `undefined`.
- `JSON.stringify(tool)` returns `"{}"`, and the spread operator (`{...tool}`) copies nothing. Read the attributes you need explicitly instead.
- `structuredClone(tool)` throws, since `Tool` is not serializable.

The following example reads a tool's properties while staying
backward-compatible with the previous `RegisteredTool` dictionary:

```javascript
const tools = await document.modelContext.getTools();
for (const tool of tools) {
  // TODO: Remove `tool.window` fallback when Chrome 160 reaches Stable (January 5, 2027).
  const source = tool.source ?? tool.window;

  // Use explicit properties rather than JSON.stringify(tool) or {...tool}.
  const { name, title, description, origin } = tool;
  const inputSchema = tool.inputSchema ?? null;
  const outputSchema = tool.outputSchema ?? null;
  const annotations = tool.annotations ?? null;

  console.log({ name, title, description, origin, inputSchema, outputSchema, annotations, source });
}
```

## Chrome 159

### Add outputSchema support in registerTool

From
[Chrome 159.0.8140.0](https://chromiumdash.appspot.com/commit/b7b01805d172cc10bc060c73ea89c7d7c775b2fa),
`document.modelContext.registerTool()` supports an optional
`outputSchema` property. Use it to declare a JSON Schema for the tool's return
value, the same way `inputSchema` describes its parameters. The spec change is
in [PR #254](https://github.com/webmachinelearning/webmcp/pull/254).

The spec doesn't yet define whether `executeTool()` fails when a tool's output
doesn't match its `outputSchema` (see
[issue #92](https://github.com/webmachinelearning/webmcp/issues/92)). For now,
agent harnesses should check each tool's output against its `outputSchema`
before returning it to the model. If it doesn't match, send the model a clear
validation error instead of the malformed data. For an example, see
[webmcp-extension PR #98](https://github.com/GoogleChromeLabs/webmcp-extension/pull/98).

```javascript
await document.modelContext.registerTool({
  name: "getWeather",
  description: "Returns the current weather for a city.",
  inputSchema: {
    type: "object",
    properties: { city: { type: "string" } },
    required: ["city"]
  },
  outputSchema: {
    type: "object",
    properties: {
      temperature: { type: "number" },
      conditions: { type: "string" }
    },
    required: ["temperature", "conditions"]
  },
  async execute({ city }) { /* ... */ }
});
```

## Chrome 156

### Relocate ontoolactivated and ontoolcancel to document.modelContext

From
[Chrome 156.0.8076.0](https://chromiumdash.appspot.com/commit/ddb244788543b6c57f4695cc05255b392860264c),
the `ontoolactivated` and `ontoolcancel` event handler properties move from
`window` to `document.modelContext` (see
[PR #245](https://github.com/webmachinelearning/webmcp/pull/245)). These event
handlers indicate when tool execution starts and when it is canceled,
respectively.

The following example handles both events while maintaining backward
compatibility with the legacy event handlers:

```javascript
const targetFor = (type, listener, options) =>
  (`on${type}` in (document.modelContext ?? {}) ? document.modelContext : window)
    .addEventListener(type, listener, options);

targetFor("toolactivated", ({ toolName }) => {
  console.log(`Tool "${toolName}" started execution.`);
});
targetFor("toolcancel", ({ toolName }) => {
  console.log(`Tool "${toolName}" execution is cancelled.`);
});
```

### Add debugging member to ToolAnnotations

From
[Chrome 156.0.8067.0](https://chromiumdash.appspot.com/commit/4ba301ad8c7c1e2190707d80aec6bc8aa63a2671),
`ToolAnnotations` includes a new `debugging` member.

Set `debugging` to `true` when registering tools for developer tooling. This
includes inspection, framework testing, and Chrome DevTools AI assistance.
This helps general purpose and end-user agents to filter out developer-focused
tools. Full technical details are available in
[PR #253](https://github.com/webmachinelearning/webmcp/pull/253).

```javascript
await document.modelContext.registerTool({
  name: "getInternalState",
  description: "Returns internal component state for diagnostics and troubleshooting.",
  inputSchema: {
    type: "object",
    properties: { componentId: { type: "string", description: "ID of the component to inspect" } },
    required: ["componentId"],
  },
  execute: ({ componentId }) => {
    return myFramework.getState(componentId);
  },
  annotations: {
    readOnlyHint: true,
    debugging: true, // Diagnostic tool intended for troubleshooting
  },
});
```

## Chrome 155

### Change executeTool input arguments type

Following [PR #246](https://github.com/webmachinelearning/webmcp/pull/246) and
[PR #251](https://github.com/webmachinelearning/webmcp/pull/251), the input
arguments type for `executeTool()` changed from `DOMString` to an optional
JavaScript object from
[Chrome 155.0.8052.0](https://chromiumdash.appspot.com/commit/23cad65d6e6613d62542b27651c28925acfaffb2).

Previously, `executeTool()` required stringified input arguments. Accepting an
optional JavaScript object directly avoids manually calling `JSON.stringify()`
and aligns with `ToolExecuteCallback`'s `inputObject`. The promise returned by
`executeTool()` now rejects if the input object is neither a valid JavaScript
object nor serializable to a JSON string.

The following example passes an input object while maintaining backward
compatibility for existing stringified input arguments:

```javascript
const inputObject = { answer: 42 };

let result;
try {
  result = await document.modelContext.executeTool(myTool, inputObject);
} catch (e) {
  // TODO: Remove when executeTool doesn't accept JSON stringified inputArgs in Chrome Stable.
  if (e.message.startsWith("Failed to parse input")) {
    result = await document.modelContext.executeTool(myTool, JSON.stringify(inputObject));
  } else {
    throw e;
  }
}
```

### Change RegisteredTool inputSchema type

Following [PR #241](https://github.com/webmachinelearning/webmcp/pull/241), the
`inputSchema` property type on `RegisteredTool` changed from `DOMString` to a
JavaScript object from
[Chrome 155.0.8051.0](https://chromiumdash.appspot.com/commit/012624d070518db013e880c36cc778445b673489).
This change initially landed in
[Chrome 154.0.8014.0](https://chromiumdash.appspot.com/commit/ec5ace9a94e9b4610a8f0ed1b9548ced902c6315)
and was
[temporarily reverted](https://chromiumdash.appspot.com/commit/dc7edb81a8039be211155a51123a34390f6dbc93).

Previously, while `ModelContextTool#inputSchema` was defined as an object during
registration, `RegisteredTool#inputSchema` returned a stringified JSON schema
(`DOMString`) when retrieved using `getTools()`. This change resolves that
inconsistency by ensuring `RegisteredTool#inputSchema` always returns a
JavaScript object that is a deep copy of the schema provided at registration.

The following example handles `inputSchema` as an object while maintaining
backward compatibility for existing stringified JSON schemas:

```javascript
const [tool] = await document.modelContext.getTools();
const inputSchemaObject =
  typeof tool.inputSchema === "string" ? JSON.parse(tool.inputSchema) : tool.inputSchema;
```

## Chrome 154

### Add consequentialHint member to ToolAnnotations

From
[Chrome 154.0.8017.0](https://chromiumdash.appspot.com/commit/a1bf6d8347ecd82fae080076f62a61e8795d8e22),
`ToolAnnotations` includes a new `consequentialHint` member.

Set `consequentialHint` to `true` when registering tools that perform
high-stakes, irreversible, or real-world actions---such as booking flights,
transferring funds, or deleting data. This hint signals agents to require
explicit user confirmation prior to execution, helping prevent unintended or
unauthorized actions. For complete technical details, see
[issue #176](https://github.com/webmachinelearning/webmcp/issues/176).

```javascript
await document.modelContext.registerTool({
  name: 'book_flight',
  description: 'Book a flight for the user with confirmed flight details.',
  inputSchema: {
    type: 'object',
    properties: {
      flightId: { type: 'string', description: 'ID of the flight to book' },
      passengers: { type: 'number', description: 'Number of tickets to purchase' },
    },
    required: ['flightId', 'passengers'],
  },
  annotations: {
    readOnlyHint: false,
    consequentialHint: true,
    untrustedContentHint: false,
  },
  execute: async ({ flightId, passengers }) => {
    // Add your flight booking transaction logic here.
    return `Booked ${passengers} passenger(s) on flight ${flightId}.`;
  },
});
```

## Chrome 153

### Pass AbortSignal to ModelContextTool execute function

From
[Chrome 153.0.8009.0](https://chromiumdash.appspot.com/commit/e18e43744babcbe0d525dc204d18e7b5c36d6ddb),
the `execute` function for tools registered using
`document.modelContext.registerTool()` always receives `signal` in its second
argument, changing the signature to `execute(inputObject, { signal })`.
Find the full technical details in
[issue #48](https://github.com/webmachinelearning/webmcp/issues/48) and
[PR #247](https://github.com/webmachinelearning/webmcp/pull/247).

This allows tools to gracefully handle execution cancellations initiated by the
user or agent. Passing this signal to long-running asynchronous tasks or network
operations (such as `fetch()`) helps prevent unnecessary work, improves overall
resource management, and avoids potential leaks.

Additionally, unregistering a tool no longer automatically cancels in-flight
executions, eliminating unexpected side effects when managing tool lifecycles in
component frameworks.

The following example forwards `signal` to a `fetch()` request so network
activity is immediately aborted when execution is canceled. For declarative API
usage, refer to
[PR #321](https://github.com/GoogleChromeLabs/webmcp-tools/pull/321).

```javascript
await document.modelContext.registerTool({
  name: "fetch_tool",
  description: "Fetch the text content of a URL and stream the response.",
  inputSchema: {
    type: "object",
    properties: {
      url: { type: "string", description: "The URL to fetch" },
      priority: { type: "string", enum: ["high", "low", "auto"] },
    },
    required: ["url"],
  },
  execute: async ({ url, priority }, { signal }) => {
    // Abort the fetch request when tool execution is aborted.
    const response = await fetch(url, { priority, signal });
    const stream = response.body.pipeThrough(new TextDecoderStream());
    for await (const chunk of stream) {
      document.querySelector("pre").textContent += chunk;
    }
    return "Success";
  },
});
```

## Chrome 152

### Remove navigator.modelContext

`navigator.modelContext`, which was
[deprecated in Chrome 150](https://developer.chrome.com/docs/ai/webmcp/updates.md.txt#navigator-modelcontext-deprecated), is removed as of
[Chrome 152.0.7943.0](https://chromiumdash.appspot.com/commit/4a9fee9eafcabd675c7245cc1b0acc1ca5f17d99).
Use `document.modelContext` instead.

## Chrome 151

### Return a Promise from registerTool

The `document.modelContext.registerTool()` method returns a `Promise` starting
in
[Chrome 151.0.7922.0](https://chromiumdash.appspot.com/commit/b9c8e4ce27902ace6c7c4b3580ebc357e72aabb2).
This change, detailed in
[issue #175](https://github.com/webmachinelearning/webmcp/issues/175), is
necessary because cross-origin iframe integration allows tools to be shared
across the frame tree, making registration fundamentally asynchronous. The
Promise resolves only when the tool is actually available to `getTools()` in
other documents, ensuring better error handling and forward compatibility as the
API evolves.

Update your code to use the asynchronous pattern shown in the following example.
For practical examples, see how the WebMCP demos were updated in
[PR #228](https://github.com/GoogleChromeLabs/webmcp-tools/pull/228).

```javascript
try {
  await document.modelContext.registerTool(myTool);
} catch (e) {
  console.error('Tool registration failed:', e);
}
```

## Chrome 150

### Deprecate navigator.modelContext in favor of document.modelContext

To align with the fact that tools are effectively per-document, the WebML CG
agreed to move the `modelContext` getter from the `Navigator` interface to the
`Document` interface. Find the full technical details in
[issue #173](https://github.com/webmachinelearning/webmcp/issues/173) and
[PR #184](https://github.com/webmachinelearning/webmcp/pull/184).

`navigator.modelContext` is deprecated as of
[Chrome 150.0.7861.0](https://chromiumdash.appspot.com/commit/4ff73984e9e60c6117066dea1806879e40c107e2)
and was later [removed in Chrome 152](https://developer.chrome.com/docs/ai/webmcp/updates.md.txt#navigator-modelcontext-removed). Use
`document.modelContext` instead.

The following feature detection pattern maintains compatibility across Chrome
releases before and after the move. For practical examples, see how the WebMCP demos were
updated in
[PR #189](https://github.com/GoogleChromeLabs/webmcp-tools/pull/189/changes).

```javascript
const modelContext = document.modelContext || navigator.modelContext;
if (modelContext) {
  // Register tools...
}
```

## Chrome 149

### Add untrustedContentHint member to ToolAnnotations

From
[Chrome 149.0.7810.0](https://chromiumdash.appspot.com/commit/9e45107e78df244be7f7cd972f891a0d8e8aeacf),
`ToolAnnotations` includes a new `untrustedContentHint` member.

Explicitly set `untrustedContentHint` to `true` if the tool processes data from
external or unverified sources to indicate that the tool's output contains data
that is untrusted from the perspective of the author registering the tool. Full
technical details are available in
[issue #136](https://github.com/webmachinelearning/webmcp/issues/136).

```javascript
navigator.modelContext.registerTool({
  name: "addTodo",
  description: "Add a new item to the todo list",
  inputSchema: {
    type: "object",
    properties: { text: { type: "string" } },
  },
  execute: ({ text }) => {
    // You should handle the persistence logic here (omitted for demo)
    return `Added todo: ${text}`;
  },
  annotations: { readOnlyHint: false, untrustedContentHint: true },
});
```

## Chrome 148

### Replace unregisterTool with AbortSignal in registerTool

The WebML CG agreed that unregistering a tool should require the same level of
ownership as unregistering an event listener. To prevent scripts from
inadvertently or maliciously unregistering tools they didn't create,
`unregisterTool()` is removed.

From
[Chrome 148.0.7757.0](https://chromiumdash.appspot.com/commit/71866d873bb9e87303f9009a188d429027fdd7a2),
`registerTool()` supports an optional `AbortSignal`. Aborting this signal
triggers the tool's unregistration. Full technical details are available in
[PR #147](https://github.com/webmachinelearning/webmcp/pull/147/).

To maintain compatibility across releases, use a wrapper similar to the
following example. You can also refer to
[PR #104](https://github.com/GoogleChromeLabs/webmcp-tools/pull/104/files) to see
how WebMCP demos were updated.

```javascript
const controller = new AbortController();
navigator.modelContext.registerTool(myTool, { signal: controller.signal });

// Unregister tool later...
navigator.modelContext.unregisterTool?.(myTool.name);
controller.abort();
```

### Remove toolparamtitle attribute

From
[Chrome 148.0.7730.0](https://chromiumdash.appspot.com/commit/216c68588d861a8cf60914779d853553f3819774),
the `toolparamtitle` attribute is removed. As discussed in
[PR #76](https://github.com/webmachinelearning/webmcp/pull/76#discussion_r2833019894)
by the WebML CG, nothing contributes to the `title` field in the synthesized
JSON Schema anymore. Using the standard HTML `<label>` element for this purpose
remains a possibility for the future.

## Chrome 147

### Remove provideContext and clearContext

To improve the WebMCP API shape, the `provideContext()` and `clearContext()`
methods are removed from
[Chrome 147.0.7721.0](https://chromiumdash.appspot.com/commit/e04dbede55ecb211f3fe2c9e47c7c5d3fced355b).
This change, detailed in
[issue #101](https://github.com/webmachinelearning/webmcp/issues/101#issuecomment-3993054932),
addresses two primary architectural concerns:

- By clearing existing tools before registering new ones, `provideContext()` posed a security risk where third-party scripts could unintentionally or maliciously overwrite official tools and hijack user-agent interactions.
- Feedback indicated that "delete-all" patterns are unconventional in web APIs. Developers preferred an additive model similar to `addEventListener`, allowing scripts to manage their own registrations independently.

To maintain more granular and secure control, use `registerTool()` and
`unregisterTool()` (later replaced by `AbortSignal` in
[Chrome 148](https://developer.chrome.com/docs/ai/webmcp/updates.md.txt#unregister-tool-signal)).