Skip to main content
Glama

Robot Actions — Remote Device Control

Device scroll to element

device_scroll_to_element

Scroll the screen until an element matching ANY of the provided locators (text, contentDesc, resourceId) appears, then return its coordinates in PHYSICAL pixels. Scrolls up to maxScrolls times.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoVisible text of the element (matches text or content-desc)
udidYesDevice serial number (UDID)
directionNoScroll direction (default: down)
maxScrollsNoMax scroll attempts (default: 5)
resourceIdNoResource ID (e.g. com.android.settings:id/switch_widget)
contentDescNoContent description / accessibility label

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, and idempotentHint=false, so the safety profile is already conveyed. The description usefully adds the bounded retry behavior (maxScrolls) and the pixel-unit return, but it does not say what happens when the element is never found (error vs. null result), which is the key behavioral unknown for a scroll-until loop.

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 tight sentences, front-loaded with the action and terminating condition, then the return format and retry bound. No filler or repetition of the name/title.

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?

Six parameters, no output schema, and the description covers matching semantics, direction/retry bound, and the shape of the return value, which is good. It stops short of describing the failure path when no matching element is found within maxScrolls, leaving the agent to guess the error/empty-result behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the description adds genuine meaning the schema does not: locators are OR-combined ('ANY of the provided locators') and the returned coordinates are in PHYSICAL pixels rather than logical units. That disjunction and unit semantics are the details most likely to be misread from the schema alone.

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?

States a specific verb (scroll), the trigger condition (until an element matching ANY provided locator appears), and the result (coordinates in physical pixels). This clearly distinguishes it from the plain device_scroll and from device_find_element/device_wait_for_element, which do not scroll to reach off-screen content.

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 trigger condition ('until an element ... appears') implies when to reach for it, but there is no explicit when-to-use/when-not guidance versus siblings like device_scroll, device_find_element, or device_wait_for_element. Usage is inferable rather than stated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources