Skip to main content
Glama
andresolbach

nodriver-mcp-server

Emulate device preset

emulate_device
Idempotent

Set a phone or tablet's user agent, viewport, touch support, and client hints together in one consistent profile to prevent mismatches that expose automation.

Instructions

Emulate a phone or tablet with one internally consistent set of signals.

Preferred over assembling emulate parameters by hand for mobile work: user agent, UA client hints (Sec-CH-UA-*), viewport, device pixel ratio, touch support and Accept-Language are set together so they cannot contradict each other — a mismatch between them is a classic automation tell.

Presets are pixel_7, pixel_7_landscape and ipad_air (aliases are listed in the device parameter). ipad_air deliberately reports desktop-class Safari with touch and sends no client hints, which is what a real iPad does.

Applies to the selected page and survives navigation. To have mobile signals present on a page's very first request, pass device to new_page or navigate_page instead of calling this afterwards. Undo with reset_emulation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYesDevice to emulate — sets user agent, UA client hints, viewport, device pixel ratio and touch together. Presets: "pixel_7" (aliases: pixel7, android, android_phone), "pixel_7_landscape" (pixel7_landscape, android_landscape), "ipad_air" (ipadair, ipad, tablet). Case, spaces and -/_ are normalised. Empty string leaves emulation unchanged.
browserNoWhich browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.default
geolocationNoOverride geolocation, as "latitude,longitude" (e.g. "37.7749,-122.4194"). Omit to leave unchanged; pass an empty string to clear a previous override.
color_schemeNoEmulate the prefers-color-scheme media feature. "auto" clears a previous override; empty string leaves it unchanged.
network_conditionsNoThrottle the network to a preset profile. "Offline" cuts the connection entirely. Empty string leaves throttling unchanged.
cpu_throttling_rateNoSlow the CPU by this factor to emulate a low-end device (4 = 4x slower; 1-20 is the useful range). 0 or 1 means no throttling.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • addedInput schema / properties / browser
      Added value: +{
      +  "default": "default",
      +  "description": "Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.",
      +  "type": "string"
      +}
  2. First observedv1.7.2

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark idempotentHint=true and destructiveHint=false, and the description adds substantial behavioral context beyond that: it sets multiple signals together to avoid contradictions, survives navigation, and the ipad_air preset deliberately reports desktop-class Safari with touch and no client hints. It also names the reset mechanism, giving the agent a complete behavioral model.

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 richly informative but every sentence earns its place: purpose, when-to-use, preset specifics, lifecycle behavior, and undo path. It is front-loaded with the core purpose and does not waste words on restating the schema.

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?

With 6 parameters, full schema coverage, an output schema present, and annotations covering safety/idempotence, the description completes the picture: it covers alternatives, first-request caveat, navigation persistence, preset semantics, and undo. Nothing an agent needs to invoke this correctly is missing.

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 meaningful context beyond the schema by explaining why presets are preferable (signals cannot contradict each other, and mismatch is a classic automation tell) and by describing the real-world behavior of the ipad_air preset. This helps the agent choose parameters more intelligently than the schema alone would.

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 opens with a specific verb and resource: 'Emulate a phone or tablet with one internally consistent set of signals.' It clearly distinguishes itself from the sibling `emulate` tool by positioning this as the preferred preset-based approach for mobile work, and from `reset_emulation` as the undo path.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('Preferred over assembling `emulate` parameters by hand for mobile work'), when not to use it ('To have mobile signals present on a page's very first request, pass `device` to new_page or navigate_page instead'), and how to undo it ('Undo with reset_emulation'). This is exemplary routing guidance.

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