Skip to main content
Glama

wait_for_stable

Wait until the screen stops changing before interacting, replacing guessed settle delays with frame sampling that returns when the display is stable or the timeout is reached.

Instructions

Wait until the screen stops changing (page loaded, app drew, animation ended) — replaces guessing a settle_ms.

Samples the display every interval_ms (100–2000) and returns as soon as two consecutive frames differ by at most threshold (fraction of pixels, default 0.2%), or after timeout_ms (max 30000). Returns {"ok", "instance", "stable", "elapsed_ms", "frames", "change": last changed fraction, "timed_out"}. "stable": false with "timed_out": true means the screen was still changing (video, spinner, blinking cursor — raise the threshold to ~0.01 for those); it is reported, not hidden. observe='screenshot'|'parse' returns the final state in the same call. Fails (isError) if the instance is down.

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
observeNonone
instanceNo
thresholdNo
timeout_msNo
interval_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the polling model, the stability criterion (two consecutive frames within threshold), the timeout cap, the exact failure semantics (isError when the instance is down), and explicitly states that an unstable result is reported rather than hidden. That last point is exactly the kind of behavior an agent cannot infer from the schema.

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?

Purpose and the settle_ms replacement are front-loaded, and nearly every sentence adds a distinct fact. The middle sentences are densely packed with backticked identifiers and parenthetical asides, making it slightly harder to scan than it needs to be, but there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although no output schema exists, the description enumerates the returned keys (ok, instance, stable, elapsed_ms, frames, change, timed_out) and explains how to interpret the ambiguous combination stable:false with timed_out:true. For a five-parameter tool with zero structured documentation, this is complete enough to call correctly on the first try.

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 0%, so the description must compensate, and it does for four of five parameters: interval_ms range 100–2000, threshold as a fraction of pixels with a 0.2% default, timeout_ms max 30000, and observe's 'screenshot'|'parse' values (an enum the schema does not even declare). Only `instance` is left unexplained beyond its default of 1.

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 opening sentence states a precise verb and resource — wait until the screen stops changing — and frames it as a replacement for guessing a fixed settle delay. That framing separates it cleanly from the sleep-style sibling wait_ms and from one-shot capture tools like screenshot/parse_screen.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear when-to-use context (after page load, app draw, animation) and an explicit escape hatch for pathological cases: raise threshold to ~0.01 for video, spinners, or blinking cursors. It also notes that observe returns the final state in the same call, implicitly avoiding a follow-up screenshot. It never names wait_ms, screenshot, or parse_screen outright, so the routing to alternatives stays implicit.

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