Skip to main content
Glama

android_find_element

Locate Android UI elements by text, content description, or resource ID to verify existence and retrieve tap coordinates for automated testing workflows.

Instructions

Find a UI element on Android screen by text, content description, or resource ID. Returns element details including tap coordinates. Use this to check if an element exists without tapping it. Workflow: 1) wait_for_element, 2) find_element, 3) tap with returned coordinates. Prefer this over screenshots for button taps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoExact text match for the element
textContainsNoPartial text match (case-insensitive)
contentDescNoExact content-description match
contentDescContainsNoPartial content-description match (case-insensitive)
resourceIdNoResource ID match (e.g., 'com.app:id/button' or just 'button')
indexNoIf multiple elements match, select the nth one (0-indexed, default: 0)
deviceIdNoOptional device ID. Uses first available device if not specified.
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's a read-only operation that returns element details without performing actions, specifies it's for checking existence, and outlines a typical workflow. However, it doesn't mention potential errors (e.g., if no element is found) or performance considerations, leaving minor gaps.

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 front-loaded with the core purpose, followed by usage guidelines and workflow, with every sentence adding value. It avoids redundancy and is efficiently structured in four concise sentences, making it easy to parse without unnecessary details.

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?

Given the tool's moderate complexity (7 parameters, no output schema, no annotations), the description is largely complete. It covers purpose, usage, and behavior well, but lacks details on error handling or output format specifics, which could be helpful for an agent. The absence of an output schema means the description doesn't fully compensate for missing return value documentation.

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?

The schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds no additional parameter semantics beyond what the schema provides, such as explaining interactions between parameters (e.g., precedence rules) or usage examples. This meets the baseline for high schema coverage.

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 specific action ('Find a UI element on Android screen') and resources involved ('by text, content description, or resource ID'), distinguishing it from siblings like android_tap_element or android_wait_for_element. It explicitly mentions the return value ('Returns element details including tap coordinates'), making the purpose unambiguous.

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 ('Use this to check if an element exists without tapping it') and when not to ('Prefer this over screenshots for button taps'). It also outlines a workflow ('Workflow: 1) wait_for_element, 2) find_element, 3) tap with returned coordinates') and distinguishes it from alternatives like screenshots, offering comprehensive usage context.

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/igorzheludkov/metro-logs-mcp'

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