Skip to main content
Glama

screenshot

Read-only

Captures a PNG of a device, emulator, or Chromium app screen and returns the image, so you can save a baseline before an interaction or inspect state after a delay.

Instructions

Capture a PNG of the device screen (iOS simulator or physical device, Android emulator, Apple TV simulator, Vega, or Chromium app). Returns { image }, the PNG file. Use when you need a baseline image before an interaction or the screen state after a delay. Gestures, key presses and app launches already attach a screenshot to their result. Fails if the capture backend (simulator-server, emulator, Chromium CDP) cannot be reached for this device.

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": {
      "udid": "<udid>"
    },
    "name": "screenshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
udidYesTarget device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, or Chromium id).
scaleNoScale factor. Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android. On a local Apple TV simulator, an Android TV or Vega, with neither set, the capture is downscaled to a 576 px long side (0.15 of a 4K capture). On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency. Range: 0.01 to 1.
rotationNoOrientation override for the screenshot (on Chromium it rotates the captured image). Rarely needed: on Android and iOS simulators the capture already follows the UI's orientation, the space describe frames and gesture coordinates use, and an override can make the image disagree with them. Ignored on physical iPhones.
downscalerNoDownscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Ignored on every other platform.
includeImageInContextNoSet false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff. The file is still written, but the image bytes are not attached to the agent context. Default: true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / downscaler / description
      Previous value: -"Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Mirrors sim-server's wire enum. Ignored on physical iPhones."New value: +"Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Ignored on every other platform."
    • changedInput schema / properties / includeImageInContext / description
      Previous value: -"Default true. Set false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff — the file is still written, but the image bytes are not attached to the agent context."New value: +"Set false only when capturing a full-resolution PNG (scale: 1.0) to save as a baseline/current for screenshot-diff. The file is still written, but the image bytes are not attached to the agent context. Default: true."
    • changedInput schema / properties / rotation / description
      Previous value: -"Orientation override for the screenshot (rotates the captured image after Page.captureScreenshot on Chromium). On Android the capture already follows the device's rotation. Ignored on physical iPhones."New value: +"Orientation override for the screenshot (on Chromium it rotates the captured image). Rarely needed: on Android and iOS simulators the capture already follows the UI's orientation, the space describe frames and gesture coordinates use, and an override can make the image disagree with them. Ignored on physical iPhones."
    • changedInput schema / properties / scale / description
      Previous value: -"Scale factor (0.01-1.0). Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android. On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency."New value: +"Scale factor. Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android. On a local Apple TV simulator, an Android TV or Vega, with neither set, the capture is downscaled to a 576 px long side (0.15 of a 4K capture). On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency. Range: 0.01 to 1."
  2. Changed2 schema fields changedv0.24.0
    • changedInput schema / properties / downscaler / description
      Previous value: -"Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Mirrors sim-server's wire enum."New value: +"Downscaling algorithm when scale<1 on Chromium. Defaults to lanczos3 (highest quality). Mirrors sim-server's wire enum. Ignored on physical iPhones."
    • changedInput schema / properties / rotation / description
      Previous value: -"Orientation override for the screenshot (rotates the captured image after Page.captureScreenshot on Chromium). On Android the capture already follows the device's rotation."New value: +"Orientation override for the screenshot (rotates the captured image after Page.captureScreenshot on Chromium). On Android the capture already follows the device's rotation. Ignored on physical iPhones."
  3. Changed2 schema fields changedv0.22.0
    • changedInput schema / properties / rotation / description
      Previous value: -"Orientation override for the screenshot (rotates the captured image after Page.captureScreenshot on Chromium)."New value: +"Orientation override for the screenshot (rotates the captured image after Page.captureScreenshot on Chromium). On Android the capture already follows the device's rotation."
    • changedInput schema / properties / scale / description
      Previous value: -"Scale factor (0.01-1.0). Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.3 if unset for iOS/Android. On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency."New value: +"Scale factor (0.01-1.0). Defaults to ARGENT_SCREENSHOT_SCALE env var, or 0.25 if unset for iOS/Android. On Chromium the default is 1.0 (no downscale); pass <1 to opt in. Downscaling on Chromium requires the optional `sharp` dependency."
  4. First observedv0.15.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond readOnlyHint the description discloses the failure mode (unreachable simulator-server, emulator, or Chromium CDP backend), the returned payload, that the file is written even when bytes are withheld from context, platform-specific downscale defaults including the ARGENT_SCREENSHOT_SCALE env var, and the optional sharp dependency on Chromium. This is substantive operational context an agent cannot get from the annotations.

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?

Four sentences, front-loaded with the action and return value, then usage conditions, then the failure mode. Every sentence carries information, though the first sentence's parenthetical platform list is dense and mildly interrupts the primary statement.

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 no output schema, the description correctly states the return value ({ image }, the PNG file). Alongside 100% schema coverage and readOnlyHint, nothing an agent needs to invoke this correctly — target, defaults, failure mode, and when to skip it — is missing.

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 description coverage is 100%, so every parameter (udid, scale, rotation, downscaler, includeImageInContext) is already documented in the schema with enums, ranges, defaults, and per-platform caveats. The description body itself adds almost no parameter meaning, so baseline 3 applies rather than credit for extra semantic lift.

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?

"Capture a PNG of the device screen" gives a specific verb and resource, lists the exact supported platform targets, and states the return shape ({ image }). It further distinguishes itself from gesture/key-press/app-launch tools that already attach screenshots, so an agent can tell when this standalone capture is what it wants.

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?

It gives explicit conditions for use (baseline before an interaction, or screen state after a delay) and an explicit exclusion (gestures, key presses, launches already return a screenshot). The includeImageInContext param description adds a further routing rule for full-resolution captures for screenshot-diff, effectively naming the sibling alternative.

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