Skip to main content
Glama

adb_ui_find

Search the Android UI hierarchy for elements by text, resource-id, or content-description, returning matching coordinates so you can target them precisely with adb_input taps and gestures.

Instructions

Search the UI hierarchy for elements matching text, resource-id, or content-description. Returns matching elements with coordinates for precise adb_input targeting.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "adb_ui_find"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoMatch elements containing this text (case-insensitive)
deviceNoDevice serial
resourceIdNoMatch elements with this resource-id (partial match)
contentDescNoMatch elements with this content-description (partial, case-insensitive)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.1.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description must carry the behavioral burden, and it does disclose that matches are returned with coordinates. It omits important behavior: what happens when nothing matches (empty result vs error), whether all matches or only the first are returned, how multiple criteria combine, and whether the hierarchy is fetched live. These gaps keep it at minimum-viable transparency.

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?

Two sentences, zero filler, with the core action front-loaded and the return value second. Nothing is redundant or padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema and no annotations, so the description is the only place return shape and edge behavior can be explained. It gives the high-level return (elements with coordinates) but leaves no-match behavior, multi-match handling, and criteria combination unstated, which is thin for a 4-parameter query tool with zero structured behavioral metadata.

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%, and each parameter already documents its matching semantics (case-insensitive, partial match) in the schema, so the baseline of 3 applies. The description adds only that these are the matching dimensions and does not address the undocumented-in-description 'device' parameter or combination behavior.

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 ('Search the UI hierarchy for elements') plus the three match criteria (text, resource-id, content-description), which is more than a restatement of the name. It does not explicitly distinguish itself from near siblings like adb_ui_dump, adb_tap_element, or adb_a11y_tree, so sibling differentiation is only implied.

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 phrase 'for precise adb_input targeting' implies the intended workflow (find, then act via input tools), which is useful implied usage guidance. However, there is no explicit when-to-use versus adb_ui_dump, adb_tap_element, adb_wait_element, or adb_scroll_until, and no stated preconditions or exclusions.

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

Deploy Server

Other Tools