Skip to main content
Glama
playwright-mcp-router

playwright-mcp-router

by huangzt

browser_emulate_media

Destructive

Emulate CSS media features for a page—light/dark color scheme, contrast, forced colors, reduced motion, and screen/print type—to test how sites respond to user preferences.

Instructions

Emulate CSS media features for the page, for example switch between the light and dark color scheme. Omitted parameters are left unchanged; null clears an override.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session": "<session>"
    },
    "name": "browser_emulate_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNoOptional Chrome tab group color override for a newly created session.
mediaNoChanges the CSS media type of the page
accountNoChrome account profile to use (defaults to 'default'). Configured accounts: 'default' (Isolated Browser).default
sessionYesRequired isolated session name (also displayed as the Chrome tab group title), e.g. "T1867-api-debug" or "home-css". Use a unique, descriptive task name per conversation so concurrent agents never hijack each other's active tab.
contrastNoEmulates the prefers-contrast media feature
colorSchemeNoEmulates the prefers-color-scheme media feature
forcedColorsNoEmulates the forced-colors media feature
reducedMotionNoEmulates the prefers-reduced-motion media feature

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, destructiveHint=true and openWorldHint=true; the description usefully adds that omitted parameters are preserved and that null clears an override, which explains how existing state can be destroyed. It does not say whether the override survives navigation, applies to one session or all tabs, or when it should be reset, which matters for a destructive-hinted tool. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, and the primary behavior plus the most error-prone parameter rule are both front-loaded. Nothing needs to be moved or removed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With eight parameters but full schema coverage and no output schema, the description covers the core mutation semantics adequately. It is thin on the required session parameter and on the interaction between session and media overrides, which is a meaningful gap given the destructive hint but not a blocking one.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds genuine semantics beyond the schema: partial updates leave other features untouched, and explicitly passing null removes an override rather than applying a value. That null-versus-omit distinction is not spelled out in the schema and is the main way an agent would misuse this tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Emulate CSS media features for the page') and gives a concrete example (light/dark color scheme), so the agent can tell it apart from navigation or interaction siblings. It does not explicitly distinguish itself from other emulation-adjacent tools, but the resource is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the example (switching color scheme for testing), but there is no explicit when-to-use or when-not-to-use guidance and no mention of session scoping or how long an override persists. The statement that omitted parameters are left unchanged is helpful state guidance but not route-selection guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.