Skip to main content
Glama

adb_wait_element

Waits for a UI element to appear or disappear by polling the Android UI hierarchy, handling navigation, animations, and async content loading with configurable timeout and polling intervals.

Instructions

Wait for a UI element to appear or disappear. Polls the UI hierarchy at regular intervals until the condition is met or timeout expires. Useful for waiting after navigation, animations, or async content loading.

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_wait_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
textNoMatch elements containing this text (case-insensitive)
deviceNoDevice serial
pollMsNoPolling interval in ms (200-5000, default 500)
conditionNoWait for element to 'appear' (default) or 'disappear'appear
timeoutMsNoMaximum wait time in ms (1s-60s, default 10s)
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 load, and it does disclose the polling mechanism, interval-based checking, and timeout expiry. It omits the most consequential behaviors: what happens when the timeout expires (error, exception, or false result), and what occurs when no selector parameter is provided (all 7 params are optional). Those gaps matter for a tool whose whole purpose is a blocking wait.

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, zero filler, with the action statement front-loaded and the mechanism and usage rationale following in priority order. Nothing repeats the schema or the tool name.

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?

For a 7-parameter, no-annotation, no-output-schema tool, the description is adequate but leaves out the return/outcome contract on timeout and the all-optional selector ambiguity. An agent could invoke it, but might not know how to interpret a failure case.

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%, so the schema already documents text, resourceId, contentDesc, condition, pollMs, and timeoutMs with ranges and defaults. The description adds no parameter meaning beyond that, so the baseline 3 applies. It also doesn't clarify how multiple selector params combine (AND vs OR), which the schema leaves ambiguous.

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 opens with a specific verb+resource: 'Wait for a UI element to appear or disappear,' which tells an agent exactly what the tool does. It implies a polling/waiting role that differs from siblings like adb_ui_find (immediate query) and adb_scroll_until, but it never names those siblings to draw the boundary.

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?

It gives real usage context ('after navigation, animations, or async content loading'), which is better than nothing. However, it never states when NOT to use it — e.g. use adb_ui_find for an instant check or adb_wait_stable for overall UI settling — so an agent must infer the choice from sibling names alone.

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