Skip to main content
Glama

wait_for_stable

Read-only

Waits until the mobile UI stops changing by confirming two identical UI tree snapshots, then returns the stable tree and optional screenshot for reliable interaction.

Instructions

Wait until the screen stops changing (two consecutive UI tree snapshots are identical). Returns the stable UI tree and optionally a screenshot.

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": "wait_for_stable"
  }
}

Input Schema

NameRequiredDescriptionDefault
platformNoTarget platform. Inferred if omitted.
device_idNoDevice ID. Omit for the connected device.
filter_uiNoFilter UI tree to relevant elements only. Default: true
timeout_msNoMaximum time to wait in ms. Default: 10000 — this waits out animation, not network
poll_interval_msNoPolling interval in ms. Default: 500
include_screenshotNoAlso capture a screenshot after stabilization. Default: false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.1

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds genuine value on top by defining what 'stable' means and what is returned (UI tree plus optional screenshot). It does not say what happens when the timeout expires before stabilization, which is the main behavioral question for a wait tool.

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, front-loaded with the wait condition and followed by the return contract. No filler or redundancy.

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?

With no output schema, the description correctly carries the return-value burden and explains the stabilization criterion. The gap is timeout behavior on non-stabilization (error vs. best-effort return), which matters for a tool whose whole job is waiting.

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 coverage is 100%, so every parameter is already documented, including the useful 'waits out animation, not network' note on timeout_ms. The description adds essentially nothing beyond the schema; the phrase 'optionally a screenshot' only restates include_screenshot. Baseline 3 applies.

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 (wait) and a precisely defined condition: two consecutive UI tree snapshots being identical. That mechanism implicitly separates it from wait_for_element and get_ui_tree, but no sibling is named, so an agent must infer the boundary itself.

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?

Usage is only implied: the timeout_ms note ('waits out animation, not network') hints that this is for animation settling rather than network-bound waits. There is no explicit statement of when to prefer this over wait_for_element or wait_for_element_gone, and no exclusions.

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