Skip to main content
Glama

glass_wait_stable

Read-only

Wait until the target window or region stops changing, then return the last stable frame. Use a timeout to avoid indefinite waiting.

Instructions

Wait for visual quiescence and return the last frame, not that an expected semantic state or pixel design was reached. Use include_image:false for text-only metadata. A timeout returns settled:false. window_id observes without selecting that window. For 2+ known active-window steps, use glass_do.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ignoreNoWindow-relative rects excluded from comparison and saw_motion, intersected with stability_region. Off-area rects clamp/drop silently; check ignored_pixels for misplaced masks.
regionNoOptional window-relative sub-rectangle for the returned frame.
max_widthNoMaximum returned image width; shrinks after crop, preserving native comparison pixels.
toleranceNoPer-channel difference allowed (0-255, default 0).
window_idNoObserve this current glass_list_windows ID without selecting it; omit for active window.
max_heightNoMaximum returned image height; omit both limits for native output.
timeout_msNoGive up after this long (default 5000ms); returns `{settled:false}` rather than erroring.
interval_msNoHow long to wait between capture ticks (default 100ms).
include_imageNoReturn image (default true). False returns settled/saw_motion/observed_ms/ignored_pixels/dimensions as text; region then has no effect.
settle_framesNoConsecutive unchanged frames required (default 3).
stability_regionNoWindow-relative area watched for settling, independent of returned-image region.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv1.8.0
    • changedInput schema / $defs / RegionArgs / properties / height / description
      Previous value: -"Height in pixels, extending down from `y`."New value: +"Height in pixels."
    • changedInput schema / $defs / RegionArgs / properties / width / description
      Previous value: -"Width in pixels, extending right from `x`."New value: +"Width in pixels."
    • changedInput schema / $defs / RegionArgs / properties / x / description
      Previous value: -"Left edge in pixels, window-relative — 0 is the window's left edge, not the screen's."New value: +"Left edge in window-relative pixels."
    • changedInput schema / $defs / RegionArgs / properties / y / description
      Previous value: -"Top edge in pixels, window-relative — 0 is the window's top edge, not the screen's."New value: +"Top edge in window-relative pixels."
    • changedInput schema / properties / ignore / description
      Previous value: -"Window-relative rectangles to exclude from the settle comparison. Use for\nperpetually animating content — a blinking text caret, a clock, a\nspinner — which otherwise keeps the window from ever settling. Pixels\ninside a rect never count as changed and never set `saw_motion`.\nCombines with `stability_region`: rects are always window-relative and\nare intersected with it. Independent of `region`, which only crops the\nreturned image. A rect that falls partially or entirely outside the\ncompared area — the frame, or the `stability_region` sub-rectangle when\none is set — is silently clamped or dropped, masking less than\nrequested or nothing at all; the excluded count is reported as\n`ignored_pixels`, so a smaller-than-expected value flags a misplaced rect."New value: +"Window-relative rects excluded from comparison and saw_motion, intersected with stability_region. Off-area rects clamp/drop silently; check ignored_pixels for misplaced masks."
    • changedInput schema / properties / include_image / description
      Previous value: -"Return the settled frame as an image (default true). Set false for a\ntext-only `{settled, saw_motion, observed_ms, ignored_pixels, width,\nheight}` result with no WebP — cheap when the next step is a text\n`glass_diff`. `region` is ignored when false."New value: +"Return image (default true). False returns settled/saw_motion/observed_ms/ignored_pixels/dimensions as text; region then has no effect."
    • addedInput schema / properties / max_height
      Added value: +{
      +  "description": "Maximum returned image height; omit both limits for native output.",
      +  "format": "uint32",
      +  "maximum": 4294967295,
      +  "minimum": 1,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / max_width
      Added value: +{
      +  "description": "Maximum returned image width; shrinks after crop, preserving native comparison pixels.",
      +  "format": "uint32",
      +  "maximum": 4294967295,
      +  "minimum": 1,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / settle_frames / description
      Previous value: -"Consecutive unchanged frames required before the UI counts as settled\n(default 3). Raise it for an app that pauses mid-animation."New value: +"Consecutive unchanged frames required (default 3)."
    • changedInput schema / properties / stability_region / description
      Previous value: -"Optional window-relative sub-rectangle to watch for settling; when set,\nthe settle decision ignores changes outside it. Independent of `region`."New value: +"Window-relative area watched for settling, independent of returned-image region."
    • changedInput schema / properties / tolerance / description
      Previous value: -"Per-channel difference (0–255) two frames may have and still count as\nunchanged (default 0, exact match). Raise it for a backend with dithering\nor compression noise."New value: +"Per-channel difference allowed (0-255, default 0)."
    • changedInput schema / properties / window_id / description
      Previous value: -"Capture/observe this window (id from `glass_list_windows`) instead of the\nactive one, without changing which window subsequent ops target. Omit for\nthe active window."New value: +"Observe this current glass_list_windows ID without selecting it; omit for active window."
  2. Addedv1.2.0

TDQS

A4.2/5.0
Behavior4/5

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

With readOnlyHint=true and openWorldHint=false already in annotations, the description adds important behavioral nuance: it returns the last frame rather than confirming a semantic state, a timeout returns settled:false, and window_id observes without selecting. These go beyond what annotations and schema already state.

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?

Five short sentences, front-loaded with core purpose, and each sentence contributes either a key distinction, a parameter usage tip, or alternative routing. No filler.

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?

For a complex 11-parameter tool with no output schema, the description covers core purpose, timeout behavior, window_id semantics, and routing to glass_do. It does not enumerate all return metadata fields, but those are documented in the schema's include_image parameter.

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%, and each parameter already has a thorough description. The description re-states some parameter behaviors (include_image, window_id, timeout) but adds no new meaning beyond the schema, so baseline 3 applies.

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 description states a specific verb ('wait') and resource ('visual quiescence'), clarifies it returns the last frame, and explicitly contrasts with waiting for semantic state or pixel design, distinguishing it from siblings like glass_wait_for_element and glass_wait_for_region.

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 an explicit alternative condition ('For 2+ known active-window steps, use glass_do') and advises on include_image:false for text-only metadata. It doesn't enumerate all sibling comparisons, but provides clear context for when the tool is appropriate.

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