Skip to content

Please formally document Permissions-Policy: tools=() as a security control #178

@DMXMax

Description

@DMXMax

Summary

The tools permissions policy feature is implemented in Chrome 150 and
confirmed working empirically. When Permissions-Policy: tools=() is set
as an HTTP response header, any call to navigator.modelContext.registerTool()
throws:

SecurityError: Failed to execute 'registerTool' on 'ModelContext': Access to the feature "tools" is disallowed by permissions policy.

This is a meaningful defensive control for site owners who want to prevent
WebMCP tool registration on pages where it should never be active —
authenticated account pages, payment flows, sensitive data pages.

It is enforced by Chrome above the JavaScript layer, meaning injected
JavaScript cannot bypass it regardless of load order or shadow attacks.

The problem

This control is not mentioned anywhere in the public spec, proposal, README,
or security-privacy.md. Site owners and security teams cannot rely on an
undocumented behavior that may change without notice.

Request

  1. Formally document Permissions-Policy: tools=() in the security
    considerations section of the spec
  2. Clarify whether this is intentional as a security control or incidental
    web platform practice
  3. If intentional, provide guidance on recommended use — specifically for
    pages that should never expose WebMCP tools

Reference

Chromium source: third_party/blink/renderer/core/script_tools/model_context.cc

if (!ExecutionContext::From(script_state)->IsFeatureEnabled(
        network::mojom::PermissionsPolicyFeature::kTools)) {
    exception_state.ThrowSecurityError(kPermissionPolicyNotEnabledError);

Tested on Chrome 150.0.0.0 with #enable-webmcp-testing flag enabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions