Skip to main content
Glama

Capture an Android display

mobile_screen_capture

Capture a specific Android logical display as an image. Returns screenshot pixels and coordinate scaling for accurate mobile input taps.

Instructions

Capture one logical display after resolving its SurfaceFlinger physical display ID. Images whose long edge exceeds 1280px are downscaled before they are returned. coordinateSpace.scaleX and scaleY convert those screenshot pixels into the logical coordinates used by mobile_input_tap.

Input Schema

NameRequiredDescriptionDefault
serialYesExact ADB serial from mobile_devices_list; never inferred when multiple devices exist
displayIdYesAndroid framework logical display ID, not a SurfaceFlinger physical ID
saveArtifactNo

Output Schema

NameRequiredDescriptionDefault
serialYes
displayYes
mimeTypeYes
sizeBytesYes
downscaledYes
durationMsYes
artifactUriNo
coordinateSpaceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.9.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / coordinateSpace
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "displayHeight": {
      +      "type": "number"
      +    },
      +    "displayWidth": {
      +      "type": "number"
      +    },
      +    "imageHeight": {
      +      "type": "number"
      +    },
      +    "imageWidth": {
      +      "type": "number"
      +    },
      +    "scaleX": {
      +      "type": "number"
      +    },
      +    "scaleY": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "imageWidth",
      +    "imageHeight"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / downscaled
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "serial",
      -  "display",
      -  "mimeType",
      -  "sizeBytes",
      -  "durationMs"
      -]New value: +[
      +  "serial",
      +  "display",
      +  "mimeType",
      +  "sizeBytes",
      +  "durationMs",
      +  "downscaled",
      +  "coordinateSpace"
      +]
  2. First observedv0.5.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations declare the safety profile, and the description adds genuinely useful behavior beyond them: the >1280px downscaling rule and the coordinateScale conversion for downstream input tools. It does not explain the readOnlyHint=false flag for what reads like a capture operation (likely artifact persistence), a minor gap.

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?

Three dense sentences with no filler, and the core operation is front-loaded before the downscaling and coordinate-mapping details. Every sentence carries information relevant to correct invocation.

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 described, and the description covers the key non-obvious behaviors (downscaling, coordinate conversion, ID resolution). The only real omission is what saveArtifact does, which leaves a small completeness gap.

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 67% and the schema already documents serial and displayId well, including the logical-vs-physical ID distinction. The description echoes the physical-ID resolution idea but does not clarify the undocumented saveArtifact parameter, so it adds only marginal meaning over the schema.

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?

States a specific verb and resource ('Capture one logical display') and adds the qualifier 'after resolving its SurfaceFlinger physical display ID', which clarifies the operation. It implicitly distinguishes itself from the sibling mobile_screen_capture_pair via 'one logical display', though it never names the sibling explicitly.

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?

Provides implied usage guidance around needing to resolve a physical display ID first and how the resulting coordinateSpace maps to mobile_input_tap. However, it never states when to prefer this over mobile_screen_capture_pair, mobile_screen_record, or mobile_ui_snapshot, so the agent must infer the choice.

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