Skip to main content
Glama
clivejefferies

mobile-debug-mcp

scroll_to_element

Scroll through a mobile app screen until a target element is located. Helps find elements not initially visible on Android or iOS.

Instructions

Purpose: Scroll until a target element becomes visible.

Inputs:

  • platform

  • selector

  • direction, maxScrolls, scrollAmount, deviceId (optional)

Output Structure:

  • action_id, timestamp (ISO 8601), action_type

  • lifecycle_state: post-dispatch lifecycle state (pending_verification or failed)

  • source_module: runtime source of the action envelope

  • target.selector = original selector

  • target.resolved = minimal resolved element info when found

  • success = true when scrolling produced a visible target element

  • failure_code/retryable when the target was not reached

  • ui_fingerprint_before/ui_fingerprint_after when available

Recommended Usage:

  1. Resolve the target selector

  2. Call scroll_to_element

  3. If needed, wait for UI stabilization using wait_for_*

  4. Verify with expect_element_visible when the expected element visibility is known

  5. If success=false, follow failure handling before retrying

Verification Guidance:

  • Follow RESOLVE → ACT → WAIT (if needed) → EXPECT

  • Use expect_element_visible when you need an explicit post-scroll confirmation

  • Do not use wait_for_* alone as final verification when an applicable expect_* tool exists

Failure Handling:

  • NAVIGATION_NO_CHANGE → adjust scroll direction or stop

  • TIMEOUT → retry with refined selector or larger scroll budget

  • UNKNOWN → capture a snapshot and stop

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceIdNoDevice UDID (iOS) or Serial (Android). Defaults to booted/connected.
platformYesPlatform to operate on (required)
selectorYes
directionNodown
maxScrollsNo
scrollAmountNo
Behavior4/5

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

Despite no annotations, the description details the post-dispatch lifecycle state, success conditions, failure codes, and optional fingerprint fields. It does not mention potential side effects like scroll causing layout changes, but overall it is transparent.

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?

The description is well-structured with clear sections and front-loaded purpose. However, the output structure section is very verbose and could be more concise, especially since there is no output schema to offload detail.

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 complexity (6 parameters, nested object, enums) and no output schema, the description covers usage workflow, success criteria, and failure modes. It lacks detail on the resolved element info output, but is otherwise thorough.

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

Parameters2/5

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

The description lists parameters but does not explain their meaning beyond the input schema. Schema coverage is only 33%, and the description does not add value for the undocumented parameters (direction, maxScrolls, scrollAmount). For example, 'scrollAmount' could be a fraction or absolute value, but no clues are given.

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 purpose is clearly stated as 'Scroll until a target element becomes visible.' This is a specific verb+resource action that distinguishes the tool from siblings like tap, swipe, and find_element.

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 usage guidance including a recommended workflow (RESOLVE → ACT → WAIT → EXPECT), verification guidance (when to use expect_element_visible vs wait_for_*), and failure handling instructions for specific error types.

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/clivejefferies/mobile-debug-tools'

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