Skip to main content
Glama
andresolbach

nodriver-mcp-server

Emulate page conditions

emulate
Idempotent

Set custom network, CPU, geolocation, user agent, color scheme, or viewport on the current page to test behavior under different conditions. Overrides persist across navigations until reset.

Instructions

Emulate network, CPU, geolocation, user agent, color scheme or viewport.

Applies to the selected page and persists across navigations until reset_emulation. Every parameter is independent — pass only what you want to change, leave the rest at their defaults.

To emulate a real phone or tablet, use emulate_device instead: it sets user agent, client hints, viewport, DPR and touch as one coherent set, which hand-assembled overrides here get wrong in ways anti-bot systems detect.

Turning touch on in the viewport also changes how click behaves — CDP mouse input can crash a touch-emulated renderer, so clicks fall back to the scripted path (isTrusted=false) for as long as touch is enabled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
viewportNoViewport override as "WIDTHxHEIGHTxDPR[,mobile][,touch][,landscape]", e.g. "375x812x3,mobile,touch" or "1920x1080x1". The trailing flags are optional: `mobile` turns on mobile viewport behaviour, `touch` enables touch emulation, `landscape` sets the screen orientation. Empty string leaves the viewport unchanged.
user_agentNoOverride the User-Agent header and navigator.userAgent. Omit to leave unchanged; pass an empty string to restore Chrome's real one. This does NOT touch UA client hints (Sec-CH-UA-*), which then contradict the spoofed UA and give the automation away — use emulate_device for mobile, it sets both consistently.
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
Behavior5/5

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

Beyond the annotations (idempotentHint=true, destructiveHint=false), the description discloses important behavioral traits: persistence across navigations, the independent-parameter behavior, and the concrete side effect that enabling `touch` changes `click` behavior (falls back to scripted path with isTrusted=false). It also warns about UA client hints not being touched by the user_agent parameter. This adds meaningful context beyond what annotations provide.

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 appropriately sized: four sentences, each serving a distinct purpose—listing capabilities, stating scope and parameter usage, mentioning the alternative tool, and warning about a behavioral interaction. No redundant or vague phrasing; the most important information is front-loaded.

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 fully schema-described parameters, an output schema present, and annotations covering mutability and idempotence, the description still adds crucial context: persistence, how to reset via reset_emulation, the explicit alternative emulate_device, and the touch-click caveat. This is sufficient for an agent to select and safely invoke the tool without additional external knowledge.

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 coverage is 100%, so the baseline is 3. The description adds extra meaning by explaining that 'Every parameter is independent — pass only what you want to change, leave the rest at their defaults,' which clarifies the default-value semantics beyond the schema. It also highlights the interaction between the viewport's `touch` flag and click behavior, which is not evident from the schema alone. These additions justify a 4, though the schema already provides thorough descriptions for each parameter.

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 the list of emulatable resources: 'Emulate network, CPU, geolocation, user agent, color scheme or viewport.' It clearly distinguishes from the sibling tool emulate_device by explicitly naming it as the alternative for real phone/tablet emulation, and also mentions reset_emulation for clearing the state.

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 gives explicit when-to-use guidance: 'To emulate a real phone or tablet, use emulate_device instead' and explains why (coherent set of user agent, client hints, viewport, DPR, touch). It also states the scope ('Applies to the selected page and persists across navigations until reset_emulation') and how to use parameters independently with defaults.

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/andresolbach/nodriver-mcp-server'

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