Skip to main content
Glama

emulate

Emulates various features on the target page. Each call replaces all emulation settings (except extraHttpHeaders), so pass all desired settings in a single call.

Instructions

Emulates various features on the target page. Each call replaces all emulation settings (except extraHttpHeaders), so pass all desired settings in a single call.

Input Schema

NameRequiredDescriptionDefault
pageIdYesTargets a specific page by ID.
viewportNoEmulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode. Omit to clear the viewport override.
userAgentNoUser agent to emulate. Omit or set to empty string to clear the user agent override.
colorSchemeNoEmulate the dark or the light mode. Omit or set to "auto" to reset to the default.
geolocationNoGeolocation (`<latitude>,<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override.
forcedColorsNoEmulate the `forced-colors` CSS media feature. Omit or set to "auto" to reset to the default.
prefersContrastNoEmulate the `prefers-contrast` CSS media feature. Omit or set to "auto" to reset to the default.
extraHttpHeadersNoExtra HTTP headers as a JSON string object, e.g. {"X-Custom": "value", "Authorization": "Bearer token"}. Headers are included into every HTTP request originating from the page and persist across navigations until cleared. Pass an empty string to clear all extra headers.
cpuThrottlingRateNoRepresents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling
networkConditionsNoThrottle network. Omit to disable throttling.
prefersReducedMotionNoEmulate the `prefers-reduced-motion` CSS media feature. Omit or set to "auto" to reset to the default.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.1.1
    • changedInput schema / additionalProperties
      Previous value: -{}New value: +false
    • changedInput schema / properties / colorScheme / description
      Previous value: -"Emulate the dark or the light mode. Set to \"auto\" to reset to the default."New value: +"Emulate the dark or the light mode. Omit or set to \"auto\" to reset to the default."
    • addedInput schema / properties / forcedColors
      Added value: +{
      +  "description": "Emulate the `forced-colors` CSS media feature. Omit or set to \"auto\" to reset to the default.",
      +  "enum": [
      +    "active",
      +    "none",
      +    "auto"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / prefersContrast
      Added value: +{
      +  "description": "Emulate the `prefers-contrast` CSS media feature. Omit or set to \"auto\" to reset to the default.",
      +  "enum": [
      +    "more",
      +    "less",
      +    "custom",
      +    "no-preference",
      +    "auto"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / prefersReducedMotion
      Added value: +{
      +  "description": "Emulate the `prefers-reduced-motion` CSS media feature. Omit or set to \"auto\" to reset to the default.",
      +  "enum": [
      +    "reduce",
      +    "no-preference",
      +    "auto"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / userAgent / description
      Previous value: -"User agent to emulate. Set to empty string to clear the user agent override."New value: +"User agent to emulate. Omit or set to empty string to clear the user agent override."
    • changedInput schema / properties / viewport / description
      Previous value: -"Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode."New value: +"Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode. Omit to clear the viewport override."
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, so the description carries real weight, and it does add non-schema value: state is wholesale replaced per call, with extraHttpHeaders as the documented exception. It doesn't explain the effect of changing viewport mid-session or that omitted values clear overrides (that part lives in the schema).

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, zero waste, with the call-shape constraint placed up front so the agent reads it before composing arguments. Nothing redundant is restated from the schema.

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?

For an 11-parameter, mutation-style tool with no output schema, the definition plus rich per-property schema docs cover what an agent needs. What's missing is only secondary: interaction with ongoing screencasts/snapshots and whether emulation persists across navigations (the description notes headers persist, implying other settings may behave differently).

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. The description adds a genuinely param-relevant semantic the schema doesn't state as a whole: settings are replaced, not merged, per invocation, which changes how an agent must fill all 11 parameters at once.

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

Purpose3/5

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

The description gives a specific verb and resource ("Emulates ... features on the target page"), so the operation type is clear. But "various features" is vague, and nothing distinguishes it from siblings that also alter page state (resize_page, navigate_page) or explains what kinds of features can be emulated without reading the schema.

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 second sentence is a strong usage rule: every call replaces all settings except extraHttpHeaders, so all desired settings must be passed together. It steers how to compose a call but doesn't say when to emulate versus using resize_page or a real device/browser, and gives no prerequisites.

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