Skip to main content
Glama

android_snapshot

Capture a compact Android UI node tree with focus metadata (up to 60 nodes) to inspect screens and enable deterministic UI automation.

Instructions

Capture a compact UI node tree (@e1..@eN, max 60 nodes) with focus metadata.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "android_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_nodesNo
include_non_interactiveNo

Output Schema

NameRequiredDescriptionDefault
okYes
errorNo
nodesNo
warningNo
expires_atNo
screen_sizeNo
snapshot_idNo
focused_app_packageNo
current_focus_packageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations, so the description carries the burden, and it does disclose real traits: a hard 60-node cap, compacted output, node aliases, and included focus metadata. It omits what happens when the tree exceeds the cap (truncation vs error), whether it requires an active android_connect session, and whether it is a pure read.

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 dense sentence with the core purpose front-loaded and no filler. The parenthetical efficiently bundles the alias format and size cap.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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-shape explanation is not owed. However, with no annotations and one of two parameters undocumented, the definition leaves meaningful gaps for a tool that gates downstream interaction.

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?

Minimum viable given zero schema description coverage and a real cost: include_non_interactive is left entirely unexplained in both schema and description, meaning the agent cannot know what toggling it does. The max_nodes default is at least reflected in the node cap.

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 a compact UI node tree") plus the concrete node-reference format @e1..@eN and the 60-node cap. An agent can tell this apart from android_screenshot (pixels) versus this (structured nodes), but the description never explicitly makes that distinction.

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?

No when-to-use guidance and no named alternatives. The implication that the resulting @eN refs feed into android_act or android_assert must be inferred by the agent, and nothing says when a screenshot is preferable.

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