Skip to main content
Glama

Emulate Mobile Device

emulate_device

Reopen the current page as a named mobile device with touch, user agent, pixel ratio, and viewport emulation while preserving session cookies.

Instructions

Reopen the current page as a named mobile device (touch, user agent, pixel ratio, viewport). Session cookies carry over; use resize for plain breakpoints.

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

Input Schema

NameRequiredDescriptionDefault
deviceYes

Output Schema

NameRequiredDescriptionDefault
dataNo
run_idYes
stagesNo
statusYes
recoveryNo
operationYes
error_codeYes
session_stateYes
schema_versionNo
progress_omittedNo
progress_delivery_failedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.10.0
    • removedInput schema / properties / device / title
      Removed value: -"Device"
    • removedInput schema / title
      Removed value: -"emulate_deviceArguments"
  2. Changed12 schema fields changed
    • removedOutput schema / properties / data / title
      Removed value: -"Data"
    • removedOutput schema / properties / error_code / title
      Removed value: -"Error Code"
    • removedOutput schema / properties / operation / title
      Removed value: -"Operation"
    • removedOutput schema / properties / progress_delivery_failed / title
      Removed value: -"Progress Delivery Failed"
    • removedOutput schema / properties / progress_omitted / title
      Removed value: -"Progress Omitted"
    • removedOutput schema / properties / recovery / title
      Removed value: -"Recovery"
    • removedOutput schema / properties / run_id / title
      Removed value: -"Run Id"
    • removedOutput schema / properties / schema_version / title
      Removed value: -"Schema Version"
    • removedOutput schema / properties / session_state / title
      Removed value: -"Session State"
    • removedOutput schema / properties / stages / title
      Removed value: -"Stages"
    • removedOutput schema / properties / status / title
      Removed value: -"Status"
    • removedOutput schema / title
      Removed value: -"AgentResult"
  3. Changed14 schema fields changedv0.5.2
    • addedOutput schema / properties / data
      Added value: +{
      +  "additionalProperties": true,
      +  "title": "Data",
      +  "type": "object"
      +}
    • addedOutput schema / properties / error_code
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Error Code"
      +}
    • addedOutput schema / properties / operation
      Added value: +{
      +  "title": "Operation",
      +  "type": "string"
      +}
    • addedOutput schema / properties / progress_delivery_failed
      Added value: +{
      +  "default": false,
      +  "title": "Progress Delivery Failed",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / progress_omitted
      Added value: +{
      +  "default": 0,
      +  "title": "Progress Omitted",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / recovery
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Recovery",
      +  "type": "array"
      +}
    • removedOutput schema / properties / result
      Removed value: -{
      -  "title": "Result",
      -  "type": "string"
      -}
    • addedOutput schema / properties / run_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "title": "Run Id"
      +}
    • addedOutput schema / properties / schema_version
      Added value: +{
      +  "const": 1,
      +  "default": 1,
      +  "title": "Schema Version",
      +  "type": "integer"
      +}
    • addedOutput schema / properties / session_state
      Added value: +{
      +  "title": "Session State",
      +  "type": "string"
      +}
    • addedOutput schema / properties / stages
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Stages",
      +  "type": "array"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "enum": [
      +    "completed",
      +    "error"
      +  ],
      +  "title": "Status",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "result"
      -]New value: +[
      +  "operation",
      +  "status",
      +  "session_state",
      +  "run_id",
      +  "error_code"
      +]
    • changedOutput schema / title
      Previous value: -"emulate_deviceOutput"New value: +"AgentResult"
  4. Addedv0.5.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and idempotentHint=false; the description adds meaningful non-obvious behavior beyond that: the page is reopened (reload side effect) and session cookies carry over. It does not mention permissions or what happens to in-flight state, but for a single-parameter tool this is solid added context.

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 short sentences, front-loaded with the action and its scope, ending with the alternative. No filler.

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?

An output schema exists, so return values need not be explained. The description covers the core behavior, side effect, and sibling routing; only the device-name source remains unspecified.

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 0%, so the description must carry parameter meaning. It implies the 'device' value is a name and lists what that preset controls, but never says where valid device names come from or what format they take, leaving a real gap.

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?

States a specific verb and resource ('Reopen the current page as a named mobile device') and clarifies the emulation dimensions (touch, user agent, pixel ratio, viewport). It also explicitly distinguishes itself from the sibling 'resize' tool, which handles plain breakpoints.

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 closing clause 'use resize for plain breakpoints' gives an explicit alternative and the condition that selects it. There is no guidance on prerequisites (e.g., whether a session must be active) or when emulation should be avoided, but the main routing decision is covered.

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