Skip to main content
Glama

List Screen Elements

mobile_list_elements_on_screen
Read-only

Lists on-screen elements with refs, coordinates, and text/accessibility labels so agents can tap, double-tap, or long-press the correct target; re-list after navigation or layout changes.

Instructions

List elements on screen with their ref, coordinates, and display text or accessibility label. Use the ref with mobile_click_on_screen_at_coordinates, mobile_double_tap_on_screen or mobile_long_press_on_screen_at_coordinates. Refs and coordinates stay valid as long as the screen does not change; re-list only after navigation or a layout change.

Input Schema

NameRequiredDescriptionDefault
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
formatNoOutput format. "text" (default) is one compact line per element, "json" is a json array, "raw" is the unfiltered platform-specific hierarchy as JSON (mobilecli only). Raw nodes may be offscreen and do not have element refstext

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds genuinely useful behavior beyond that: refs and coordinates are cached and remain valid only until the screen changes, which prevents stale-ref failures. It does not discuss result size or performance on dense screens.

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?

Three sentences, front-loaded with the output shape, then the follow-up action, then the caching constraint. Every sentence carries distinct operational information and none repeats the schema.

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?

With no output schema, the description compensates by naming the returned fields (ref, coordinates, text/label), and it covers the ref lifecycle that an agent must respect. The format parameter's effect on the returned data is left entirely to the schema, which is acceptable but is the one remaining 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 100%, including an enum with a clear definition of text/json/raw and the caveat that raw nodes lack element refs, so the schema does the heavy lifting. The description adds nothing about the device or format parameters. Baseline 3 applies when structured fields already document every parameter.

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?

States a specific verb and resource ('List elements on screen') and enumerates exactly what comes back: ref, coordinates, and display text or accessibility label. That is enough for an agent to distinguish it from siblings like mobile_take_screenshot or mobile_get_screen_size without opening any schema.

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

Usage Guidelines4/5

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

Explicitly routes the agent forward: use the ref with mobile_click_on_screen_at_coordinates, mobile_double_tap_on_screen, or mobile_long_press_on_screen_at_coordinates. It also gives a when-not-to-call rule ('re-list only after navigation or a layout change'). No guidance on choosing a listing over a screenshot, which keeps it from a 5.

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