Skip to main content
Glama

snapshot_ui

Capture a UI state snapshot to verify screen changes after actions without loading full content. Use before taps or swipes to confirm visual updates efficiently.

Instructions

Takes a lightweight snapshot of the current UI state and returns a short token.

Use this before performing an action (tap, swipe, launch, key press) when you only need to confirm the screen changed afterward — not read its content. Pass the returned token to detect_ui_change as baseline_token. This avoids loading the full XML hierarchy into context unnecessarily. Do not use this when you need to read or interact with screen elements — use get_ui_hierarchy for that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_serialNoAndroid device serial (e.g. 'emulator-5554' or '192.168.1.10:5555'). Omit only when a single device is connected. If the tool returns a multi-device error: STOP. Present the device list to the user verbatim and wait for their explicit choice. Do NOT retry with a guessed or inferred serial — this is a hard requirement. Once the user provides a serial, use it for every subsequent call in this session. To switch devices mid-session, ask the user first.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it returns a short token rather than full UI content, explains how the token should be used with detect_ui_change, and clarifies that this avoids loading the full XML hierarchy. It doesn't mention performance characteristics, error conditions, or authentication needs, but provides substantial operational 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?

The description is efficiently structured with four sentences that each serve a distinct purpose: stating the core function, explaining when to use it, describing the token's purpose, and providing exclusion criteria. There's no wasted text, and key information appears early.

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?

Given the tool's moderate complexity, 100% schema coverage, and the presence of an output schema (which handles return values), the description provides excellent contextual completeness. It explains the tool's purpose, usage guidelines, behavioral characteristics, and relationship to sibling tools without needing to repeat schema information.

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 the schema already fully documents the single parameter (device_serial). The description doesn't add any parameter-specific information beyond what's in the schema. This meets the baseline expectation when schema coverage is complete.

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?

The description clearly states the tool's purpose with specific verbs ('takes a lightweight snapshot of the current UI state') and distinguishes it from sibling tools ('not read its content', 'use get_ui_hierarchy for that'). It explicitly contrasts with get_ui_hierarchy for reading/interacting with screen elements.

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?

The description provides explicit guidance on when to use this tool ('before performing an action... when you only need to confirm the screen changed') and when not to use it ('Do not use this when you need to read or interact with screen elements'). It names the alternative tool (get_ui_hierarchy) and explains the purpose of the returned token for detect_ui_change.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Neverlow512/agent-droid-bridge'

If you have feedback or need assistance with the MCP directory API, please join our Discord server