Skip to main content
Glama

safari_emulate

Emulate mobile devices in Safari by resizing the viewport and overriding user agent, platform, and touch points. Supports preset devices or custom dimensions.

Instructions

Emulate a mobile device: sizes the Safari window to the device's CSS viewport and overrides navigator.userAgent/platform/maxTouchPoints (iOS/iPadOS 27 values) in the current page — JavaScript only: the HTTP User-Agent header is unchanged and a reload or navigation clears it. Devices: iphone-18-pro, iphone-18-pro-max, iphone-air, iphone-17, iphone-17e, iphone-16, iphone-14, iphone-14-pro-max, ipad, ipad-air-11, ipad-air-13, ipad-pro-11, ipad-pro-13, ipad-pro, pixel-7, galaxy-s24. Or pass width/height (and userAgent).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoCustom viewport width
deviceNoDevice name from the list in the description, e.g. iphone-18-pro, iphone-air, ipad-pro-11
heightNoCustom viewport height
userAgentNoCustom user agent string

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.21.8
    • changedInput schema / properties / device / description
      Previous value: -"Device name: iphone-14, ipad, pixel-7, galaxy-s24, etc."New value: +"Device name from the list in the description, e.g. iphone-18-pro, iphone-air, ipad-pro-11"
    • removedInput schema / properties / scale
      Removed value: -{
      -  "description": "Initial scale (default: 1)",
      -  "type": "number"
      -}
  2. Addedv2.11.6
  3. Removedv2.11.3
  4. Addedv2.10.9
  5. Removedv2.10.8
  6. Addedv2.10.5
  7. Removedv2.10.4
  8. First observed

TDQS

A4/5.0
Behavior5/5

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

With no annotations, the description carries the full transparency burden and excels: it discloses that the emulation is JavaScript-only (HTTP User-Agent header unchanged), specifies exactly which navigator properties are overridden, and states that reload or navigation clears the effect. This gives an agent a precise mental model of side effects and persistence.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single well-structured sentence that front-loads the core behavior, then states the JavaScript-only caveat, then the device list, then custom dimensions. The device list is long but necessary since there is no enum in the schema; no sentence is wasted.

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 tool with no output schema and no annotations, the description covers the essential behavior, parameter choices, and the transient nature of the emulation. Minor gaps remain—such as whether resetting is possible or whether width/height override device—but these are partially addressed by sibling tool names and the schema.

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?

The schema already covers all parameters (100% description coverage), so the baseline is 3. The description adds a complete list of valid device names, clarifies that width/height/userAgent can be used as an alternative to device, and indicates userAgent is optional, which materially helps an agent choose parameter combinations.

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 clearly states that the tool emulates a mobile device by resizing the Safari window to the device's CSS viewport and overriding navigator properties, and it lists supported devices and custom width/height. However, it does not explicitly contrast with sibling tools like safari_resize or safari_reset_emulation, so it lacks direct sibling differentiation.

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

Usage Guidelines3/5

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

The description implies when to use the tool (to emulate a mobile device on the current page) and notes that reload or navigation clears the effect, which signals transient usage. It does not explicitly name alternatives or exclusion conditions, such as when safari_resize or safari_reset_emulation should be preferred.

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