Skip to main content
Glama

find_elements

Query Android UI elements using AND-combined text, ID, class, package, state, regex, or region predicates; returns all matches and a snapshot_id without clicking.

Instructions

Query UI with AND-combined text/id/class/package/state/region predicates, regex and explicit nth. Does not click; returns all matches plus snapshot_id.

Input Schema

NameRequiredDescriptionDefault
selectorYes
max_resultsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the load; it usefully discloses that the tool never performs clicks and that results carry a snapshot_id for follow-up actions. It says nothing about result limits, truncation behavior when matches exceed max_results, or cost/latency of a full-tree scan.

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?

Two tightly packed sentences, front-loaded with the verb and the AND-combination rule, with the read-only caveat and return payload in second position. Dense but no filler; "explicit nth" is terse yet the selector schema repeats the ambiguity rule.

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?

An output schema exists, so return values need not be described. For a query tool of moderate complexity the description covers the predicate model, conjunction semantics, non-mutating behavior, and the snapshot_id handoff to action tools — what an agent needs before calling it.

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 0% across ~25 selector fields, so the description must compensate. It does map the major predicate families (text, id, class, package, state flags, region, regex, nth) and confirms AND-combination, but leaves hint, semantic_key, index, label_contains, description_contains, snapshot_id and max_results entirely unexplained.

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 ("Query UI") plus the predicate vocabulary it accepts and what it returns (all matches plus snapshot_id). The clause "Does not click" implicitly separates it from action siblings like tap_element/element_action, though no sibling is named 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?

The "Does not click" note implies this is the read-only lookup step to run before an action tool, but there is no explicit when-to-use or when-to-prefer guidance versus get_ui_tree, inspect_view_hierarchy, ui_query, or element_action. The agent must infer the workflow.

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