Skip to main content
Glama

glass_wait_for_region

Waits for a UI region to change or match a saved baseline, returning metrics like changed percentage and bounding box. Use 'matches' to confirm the UI reached an approved design without vision tokens.

Instructions

Block until a visual region changes (diverges from a reference) or matches (converges to a saved baseline), then return text metrics (no image unless include_image:true). until: "changes" (default) or "matches" (needs baseline); optional window-relative region; mode perceptual|exact with threshold/tolerance. Returns {matched,changed_pct,bbox,elapsed_ms}. Use "matches" to confirm the UI reached an approved design without spending vision tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo"perceptual" (default) or "exact".
untilNo"changes" (default; diverge from reference) or "matches" (converge to baseline).
ignoreNoWindow-relative rectangles to exclude from the comparison. Use for perpetually animating content — a blinking text caret, a clock, a spinner — which otherwise keeps `changed_pct` permanently non-zero. `changed_pct` is measured over the pixels that remain. Combines with `region`: rects are always window-relative and are intersected with it. A rect that falls partially or entirely outside the compared area — the frame, or the `region` sub-rectangle when one is set — is silently clamped or dropped, masking less than requested or nothing at all; the excluded count is reported as `ignored_pixels`, so a smaller-than- expected value flags a misplaced rect.
regionNoWindow-relative sub-rectangle to watch; omit for the whole window.
baselineNoSaved baseline name to compare against; omit to use the frame at call start.
thresholdNoPerceptual sensitivity (default 0.1; smaller = stricter).
toleranceNoExact per-channel tolerance (default 0).
window_idNoCapture/observe this window (id from `glass_list_windows`) instead of the active one, without changing which window subsequent ops target. Omit for the active window.
timeout_msNoGive up after this long (default 10000ms); returns `{matched:false}`.
interval_msNoPoll interval (default 100ms).
include_imageNoOn match, also return the watched region as an image (default false).
Behavior4/5

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

With no annotations, the description discloses key behaviors: blocking, return metrics shape, no image unless include_image:true, and the difference between changes and matches. It does not explicitly state the tool is read-only or has no side effects, but the blocking/wait semantics imply that.

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?

The description is compact and front-loaded, with the primary behavior in the first sentence, followed by a concise parameter summary, return shape, and a practical usage tip. Every sentence contributes value without waste.

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 an 11-parameter tool with no output schema, the description provides the essential return shape and core behavior. It does not mention timeout behavior (matched:false) or the complex 'ignore' parameter, but those are detailed in the schema. The description is sufficient for an agent to understand the tool's purpose and high-level usage.

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 coverage is 100%, so baseline is 3. The description adds meaning beyond the schema by clarifying that 'matches' needs a baseline, by explaining the image output is optional, and by summarizing how mode/threshold/tolerance interact. This elevates it above the baseline.

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?

The description clearly states the tool blocks until a visual region changes or matches, and returns text metrics. It distinguishes between 'changes' and 'matches' modes, but does not explicitly differentiate from sibling wait tools like glass_wait_stable or glass_wait_for_element.

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?

The description gives an explicit use case: 'Use "matches" to confirm the UI reached an approved design without spending vision tokens.' It provides context for when to use the matching mode, though it does not name alternatives or exclude other tools.

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/fixed-width/glass'

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