Skip to main content
Glama

Emulate media features

browser_emulate_media
Destructive

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. Takes the session_id from open_browser. 0.1¢ a step that runs.

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_id": "<session_id>"
    },
    "name": "browser_emulate_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
mediaNoChanges the CSS media type of the page
contrastNoEmulates the prefers-contrast media feature
session_idYesThe session id open_browser returned.
colorSchemeNoEmulates the prefers-color-scheme media feature
forcedColorsNoEmulates the forced-colors media feature
reducedMotionNoEmulates the prefers-reduced-motion media feature

Output Schema

NameRequiredDescriptionDefault
urlNoThe address of the page after the step.
errorNoWhy the step failed, when it failed.
titleNoThe page title.
read_atNoWhen the page was read.
took_msNoHow long the step took.
price_usdNoWhat the step cost, in dollars.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "The page after the step, and what the step cost.",
      +  "properties": {
      +    "error": {
      +      "description": "Why the step failed, when it failed.",
      +      "type": "object"
      +    },
      +    "price_usd": {
      +      "description": "What the step cost, in dollars.",
      +      "type": "number"
      +    },
      +    "read_at": {
      +      "description": "When the page was read.",
      +      "type": "string"
      +    },
      +    "title": {
      +      "description": "The page title.",
      +      "type": "string"
      +    },
      +    "took_ms": {
      +      "description": "How long the step took.",
      +      "type": "integer"
      +    },
      +    "url": {
      +      "description": "The address of the page after the step.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and idempotentHint=false, and the description adds genuinely useful state behavior beyond them: partial updates leave other features untouched and null resets an override back to browser default. It also discloses cost (0.1¢ per step that runs), which annotations do not cover. It doesn't explain whether the override persists across navigation or how it interacts with other emulation state, so not a 5.

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

Conciseness4/5

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

Three tight sentences, front-loaded with purpose, followed by update semantics and prerequisites—no filler. The cost note ("0.1¢ a step that runs") is terse to the point of being slightly awkwardly phrased, but it is relevant information.

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

Completeness5/5

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

For a six-parameter, enum-heavy emulation tool with an output schema already covering return values, the description supplies purpose, update/reset semantics, session prerequisite, and cost—everything an agent needs to invoke it correctly. Nothing material is missing.

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

Parameters3/5

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

Schema coverage is 100% and all five media parameters are documented with enums in the schema, so baseline would be 3. The description adds the null-clears-override and omitted-unchanged semantics, which is real added meaning, but it doesn't touch individual parameters beyond the color-scheme example, so it stays at baseline.

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

Purpose5/5

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

States a specific verb and resource ("Emulate CSS media features for the page") and anchors it with a concrete example (light/dark color scheme). No other sibling tool touches media emulation, so an agent can distinguish it from browser_resize or browser_navigate without opening schemas.

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

Usage Guidelines4/5

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

Gives a clear usage context (switching color scheme, media features) and the prerequisite that session_id comes from open_browser. It also explains the update semantics (omitted parameters unchanged, null clears). It does not name when-not-to-use or an alternative tool, so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.