# Which cross-origin iframe cases require allow=tools and which must fail?

Canonical: https://mudpie.ai/webmcp/guides/cross-origin-iframe-webmcp-allow-tools-matrix/
Breadcrumb: [Home](https://mudpie.ai/) / [WebMCP guides](https://mudpie.ai/webmcp/guides/) / [Which cross-origin iframe cases require allow=tools and which must fail?](https://mudpie.ai/webmcp/guides/cross-origin-iframe-webmcp-allow-tools-matrix/)
Author: Ali Abouelatta (https://mudpie.ai/authors/ali-abouelatta/)
Published: 2026-09-19
Updated: 2026-09-19
Research type: guide
Method: Documentation-derived iframe and Permissions Policy guide using Chrome and the W3C WebMCP draft. An owned-fixture matrix is proposed; no third-party security testing was performed.

If the page is top-level or same-origin, Chrome’s default `tools` policy can allow WebMCP. If the tool lives in a cross-origin iframe, the embedder must explicitly grant `allow="tools"`. That permission only makes the API available to the frame. It does not grant account access, bypass authentication, or make an unsafe tool safe.

## The four cases

Chrome’s [WebMCP documentation](https://developer.chrome.com/docs/ai/webmcp) says the `tools` Permissions Policy defaults to `self`: top-level and same-origin contexts can register tools, while cross-origin iframes are disabled unless the embedder opts them in. The [W3C WebMCP draft](https://webmachinelearning.github.io/webmcp/) describes the same policy-controlled feature and also documents a header-level way to disable it.

| Context | Does `allow="tools"` matter? | What to check next |
| --- | --- | --- |
| Top-level, origin-isolated page | No iframe attribute | Secure context, trial/flag state, origin isolation, and server auth |
| Same-origin iframe | Usually no extra allow attribute | Parent policy, page state, and the frame’s own tool lifecycle |
| Cross-origin iframe without the attribute | Yes: tools are disabled | Add the narrow permission at the embedder, then check the frame origin |
| Cross-origin iframe with `allow="tools"` | Registration permission is open | Origin trial token, origin isolation, `exposedTo`, `fromOrigins`, and backend authorization |

A missing tool list can be a parent-policy or origin-gating problem, not an application-code failure.

## The permission does not move the trust boundary

The `tools` permission controls whether the embedded document can register WebMCP tools. It does not, by itself, make those tools discoverable or executable across origins.

Chrome’s current [Imperative API documentation](https://developer.chrome.com/docs/ai/webmcp/imperative-api) describes a second, explicit gate:

- the provider lists the caller origin in `exposedTo` when it registers the tool; and
- the caller, for example the parent page, puts the tool-providing iframe origin in `fromOrigins` when it calls `getTools()`.

Both sides list the other origin, and both are separate from `allow="tools"`, which only controls registration permission. `allow="tools"` alone does not let a parent invoke a child’s tool. Nor do `exposedTo` and `fromOrigins` replace authentication, tenant checks, or user approval. The frame remains a separate origin, with its own page and server boundaries.

That matters for dashboards, checkout widgets, support consoles, and any product that embeds a tool-capable surface from another origin. A frame can be allowed to register a tool and still be unable to read the user’s account, call the backend, or complete an action without the normal authentication and authorization checks.

I would treat these as separate questions:

1. Can the frame register tools under the `tools` Permissions Policy?
2. Which caller origin does the provider expose through `exposedTo`?
3. Does the caller request the provider’s iframe origin through `fromOrigins`?
4. What page state can the discovered tools read?
5. What backend identity and permissions does an invocation use?
6. What user approval is required for a side effect?

Only the first question is answered by `allow="tools"`.

## Origin isolation still applies

Chrome’s docs also say WebMCP is available only in origin-isolated documents and that enabling `document.domain` disables the APIs. So a cross-origin frame with the right Permissions Policy can still fail if the document’s origin configuration is incompatible.

If the feature is being tested through an origin trial, the token boundary matters too. Chrome’s [origin-trial guide](https://developer.chrome.com/docs/web-platform/origin-trials) explains that the registered origin must match the context using the feature. A token that works for the parent page is not automatically evidence for a different frame origin.

This is why “the parent page has the token” is not a sufficient iframe diagnosis. Record the frame URL, the JavaScript execution origin, the token delivery location, and the browser mode separately.

## Use the policy as a safety control

If a site does not intend to expose WebMCP in a document or its descendants, the W3C draft documents `Permissions-Policy: tools=()` as a way to disable the feature before page scripts run. That is a useful kill switch for an application shell, an untrusted embed, or a surface that has not passed its own review.

The safe configuration pattern is narrow:

- grant `allow="tools"` only to the specific frame that needs it;
- keep the server’s normal authentication and tenant checks;
- expose read-only tools before write tools;
- require visible confirmation for sensitive actions; and
- keep a human fallback when the frame cannot finish the task.

Do not respond to a missing tool by allowing every origin or disabling the parent policy globally. That changes the security boundary before you know what failed.

## Prove it on an owned fixture

The useful test is a four-row matrix on pages and frames you control:

- top-level page;
- same-origin iframe;
- cross-origin iframe without the permission; and
- cross-origin iframe with the permission.

For each row, record API availability, registered tool names, `exposedTo`, the caller’s `fromOrigins`, manual read-only invocation, frame origin, and server authorization result. For the cross-origin row, leaving either explicit origin gate out should keep the tool unavailable. Do not use a third-party site as a security test. The fixture should tell you whether the failure is policy, origin, browser mode, tool registration, discovery, or application authorization.

## The decision

Use the default policy for top-level and same-origin surfaces. Add `allow="tools"` only when a specific cross-origin frame needs the capability and its owner accepts the boundary. Keep the permission decision separate from data access and action approval. That is the difference between making an iframe usable and accidentally making it trusted.


## Author disclosure

I cofound Lazyweb and publish Mudpie. This is an owner-written publication, not an independent testing organization. Research notes distinguish observations, sourced reporting and editorial judgment.
