Skip to main content
Glama

device.preset

Emulates desktop, phone, tablet, and laptop presets by setting viewport, DPR, touch, and user agent for responsive testing.

Instructions

Emulate a device: desktop, desktop-hidpi, laptop, iphone (390), iphone-se (375, the modern SE), phone-small (320, the original SE and the width most layouts break at), pixel, tablet, ipad. Sets viewport, DPR, touch and user agent.

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": {
      "preset": "<preset>"
    },
    "name": "device.preset"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations declare readOnlyHint=false and openWorldHint=true, and the description usefully specifies the exact set of emulated properties that will be mutated. However, it does not say whether the page reloads, whether prior emulation state is overwritten, or how the change can be undone — meaningful gaps for a state-mutating tool.

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?

A single front-loaded sentence: the action, the allowed values, then the effects. The parenthetical asides are compact and carry real information (device widths) rather than filler, and nothing is repeated 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 a four-parameter, no-output-schema tool this covers the essentials: accepted values, what state changes, and whose page it applies to (via schema handles). Missing only the default orientation behavior and the reset/undo path, which keeps it short of fully complete.

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 50% and the required `preset` parameter is only typed as a bare string with no enum, so the description's full enumeration of valid preset names with their pixel widths adds genuine meaning the schema lacks. The `orientation` parameter, target_id and browser_id are left to the schema, which already documents them.

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?

The description opens with a specific verb and resource ("Emulate a device") and immediately enumerates the accepted presets, so the agent knows exactly what the tool does. It also states the four things that get changed (viewport, DPR, touch, user agent), which implicitly separates it from device.viewport, but it never names that sibling, so differentiation is left to inference.

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

Usage Guidelines2/5

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

There is no explicit when-to-use guidance, no statement about when to prefer device.viewport for a custom size, and no mention of using device.reset to restore the emulation afterwards. The parenthetical notes on widths (e.g. "the width most layouts break at") hint at testing scenarios but do not help the agent choose between sibling tools.

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