Skip to main content
Glama

adb_scroll_until

Scroll Android screens repeatedly in a chosen direction until a target element is found, then optionally tap it. Use it to locate items in long lists or scrollable content.

Instructions

Scroll the screen repeatedly until a target element is found. Performs a swipe gesture, then checks the UI hierarchy for the target. Repeats until found or max iterations reached. Useful for finding elements in long lists or scrollable content.

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

Input Schema

NameRequiredDescriptionDefault
textNoMatch elements containing this text (case-insensitive)
deviceNoDevice serial
directionNoScroll direction (default 'down' = content moves up, revealing lower items)down
maxScrollsNoMaximum scroll attempts (1-50, default 10)
resourceIdNoMatch elements with this resource-id (partial match)
contentDescNoMatch elements with this content-description (partial, case-insensitive)
tapWhenFoundNoAutomatically tap the element when found

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

B3.4/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 full burden. It does useful work by disclosing the swipe-then-inspect loop and that it terminates on found or max iterations, plus that tapWhenFound triggers a tap. However, it never says what happens on failure (exception, null, false), whether scrolling stops at content boundaries, or that at least one matcher parameter must be supplied — meaningful gaps for a loop-driven automation tool.

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?

Four short sentences, front-loaded with the core action and immediately followed by the mechanical explanation and the use case. No filler, though the third sentence largely restates the first and could be merged.

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?

With no annotations and no output schema, the description must cover behavior and results alone. It explains the iteration model but not the return value (element details? coordinates? boolean?) or the failure mode, and it omits the critical constraint that zero required parameters means the caller must still provide a matcher — a real gap for a 7-parameter tool.

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 all seven parameters including the direction enum semantics and maxScrolls bounds. The description adds no matching-combination semantics (e.g., whether text and resourceId are ANDed or ORed, or that zero matchers is invalid), so it neither compensates for nor extends the schema.

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 ('Scroll the screen repeatedly until a target element is found') and describes the loop mechanics (swipe, dump hierarchy, repeat). It doesn't distinguish itself from close siblings like adb_ui_find, adb_wait_element, or adb_tap_element, so an agent must infer the boundary from the scroll-until-found behavior alone.

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 final sentence gives a usage context ('long lists or scrollable content'), which is a genuine but implicit when-to-use signal. There is no explicit guidance on when to prefer adb_wait_element (time-based waiting) or adb_ui_find (single-shot lookup), and no exclusions or prerequisites are stated.

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