Skip to main content
Glama

environment.media_features

Override browser media features such as prefers-color-scheme or reduced-motion by setting custom emulated values, merging them with existing overrides for accurate responsive testing.

Instructions

Set arbitrary emulated media features, merged with what is already overridden.

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": {
      "features": "<features>"
    },
    "name": "environment.media_features"
  }
}

Input Schema

NameRequiredDescriptionDefault
mediaNo
featuresYes
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, so the mutating, browser-touching nature is already signaled. The description's real value-add is the merge semantics ('merged with what is already overridden'), which tells the agent this does not clear prior overrides — but it omits persistence scope, whether a reload is needed, and whether emulation applies per-target.

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?

A single front-loaded sentence with no filler. It is efficient, though the terseness leaves the reader without a second sentence that could have explained the features map.

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

Completeness2/5

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

For a mutating tool with a nested free-form object parameter, 50% schema coverage, no output schema, and no annotations beyond a readOnly/openWorld hint, the description is too thin. It should at minimum say what 'media' controls, what keys 'features' takes, and how this differs from the named-feature siblings.

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

Parameters2/5

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

Schema coverage is only 50%: target_id and browser_id are self-documented, but the 'media' string and the 'features' key/value map have no descriptions in either schema or description. The merge sentence hints at partial-update semantics for 'features' but nothing explains what 'media' selects or what keys the features map accepts.

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?

States a specific verb and resource ('Set arbitrary emulated media features'), which is enough to distinguish it from named-feature siblings like environment.color_scheme or environment.reduced_motion — though it never names them as the preferred route for those specific features.

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?

The word 'arbitrary' implies this is the generic escape hatch for features not covered by the dedicated siblings, but the routing is only implied. There is no explicit when-to-use, no mention of environment.reset for clearing overrides, and no scope guidance on target_id vs browser_id.

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

Deploy Server

Other Tools