Skip to main content
Glama

emulate_media

Idempotent

Simulate device and environment conditions by overriding color scheme, motion preferences, print mode, and navigator user agent. Reset to restore real settings.

Instructions

Make the page believe it runs in a different environment, until reset or reload: prefers-color-scheme, prefers-reduced-motion, print mode (matchMedia override + CSS) and navigator.userAgent/platform. user_agent only changes what page JS reads — the request header is a separate thing, set it with network_rules(action=modify_header, header="User-Agent"). Pair with viewport_resize to emulate a device.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resetNoRemove all emulations
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
printModeNoMake print media queries match, without opening a print dialog
user_agentNoOverrides navigator.userAgent and appVersion in the page (not the HTTP header)
colorSchemeNoValue reported to prefers-color-scheme queries
reducedMotionNoValue reported to prefers-reduced-motion queries
Behavior5/5

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

The description discloses key behavioral traits beyond annotations: the emulation is temporary (until reset or reload), and it details the scope of userAgent override (only page JS, not HTTP header). Annotations indicate idempotentHint=true and destructiveHint=false, which are consistent. No contradictions.

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?

The description is concise (two sentences) and front-loaded with the primary purpose. Every sentence adds value: first sentence defines the tool and lists overrides; second sentence clarifies a common confusion (userAgent vs header) and suggests a pairing. No wasted words.

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?

Given the complexity (6 parameters, no output schema), the description covers the main functionality, scope (until reset/reload), and relevant sibling tools. It does not explicitly describe the reset parameter's effect or return values, but these are handled by the schema. Overall it provides sufficient context for an agent to understand and invoke the tool correctly.

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%, so baseline is 3. The description adds context about the overall effect (e.g., 'print mode' overrides matchMedia) and relationships to other tools, but does not provide additional meaning for individual parameters beyond the schema descriptions. It adds moderate value but not significant per-parameter detail.

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?

The description clearly states the tool's purpose: making the page believe it runs in a different environment, listing specific overrides (prefers-color-scheme, prefers-reduced-motion, print mode, userAgent/platform). It distinguishes from sibling tools like network_rules for user-agent headers and suggests pairing with viewport_resize for device emulation.

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?

The description provides explicit guidance on when to use alternatives (e.g., network_rules for modifying the User-Agent HTTP header) and suggests pairing with viewport_resize for device emulation. However, it does not explicitly mention when to use the reset parameter or when the tool is not appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/frsorrentino/chrome-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server