Skip to main content
Glama

find_elements

Locate Android UI elements by text, resource ID, or content description. Returns element records with tap coordinates, supporting substring or exact matches.

Instructions

Find on-screen elements matching any of text / resource_id / content_desc. Substring match by default; exact=True requires a full match. Returns the same element records as dump_ui, each with a bounds.center for tapping.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
exactNo
serialNo
resource_idNo
content_descNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does fairly well: it discloses matching semantics (substring by default, exact=True for full match), that multiple criteria are OR-combined ('any of'), and the return shape (element records with bounds.center for tapping). It omits what happens on no-match or when no criteria are supplied, but for a read-only lookup this is a solid behavioral picture.

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 tight sentences with no filler; the match criteria and default matching mode are front-loaded before the return-shape note. The slash-separated selector list is dense but compact and readable.

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 detailed, yet the description usefully points to bounds.center for the follow-up tap. For a zero-required-parameter read tool this is nearly complete; only the undocumented serial parameter and absent when-to-use guidance keep it from being fully self-contained.

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 5 parameters, so the description must compensate. It explains the three selector parameters and the exact flag's matching semantics, but the 'serial' parameter is never mentioned, and the interaction between selectors and the default state of a null selector is left unstated.

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?

The description states a specific verb and resource ('Find on-screen elements') and names the exact match criteria (text / resource_id / content_desc). It also implicitly distinguishes itself from dump_ui by noting it returns 'the same element records as dump_ui', framing itself as the filtered counterpart. It stops short of an explicit sibling contrast, but the purpose is unambiguous.

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?

Usage is only implied: a search-before-tap workflow is suggested by 'bounds.center for tapping', and the relationship to dump_ui is referenced. However, there is no explicit statement of when to call find_elements instead of dump_ui or tap_element, and no exclusions or prerequisites are given.

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