Skip to main content
Glama

wait_for_change

Watch a screen region, window, or monitor and return when it changes or settles, replacing guessed sleeps with elapsed time, change location, and a final screenshot.

Instructions

Watch part of the screen and return when it changes (mode 'change') or when it has stopped changing (mode 'settle'), instead of guessing a sleep. Reports how long it took, where the screen changed, and the final state as an inline screenshot. regions are in the screenshot's pixels (like find_text and screen_diff); add origin for desktop coordinates.

Input Schema

NameRequiredDescriptionDefault
keepNoKeep the final screenshot on disk and return its path (default false: it is only returned inline).
modeNo'change' (default) returns as soon as the target differs from when the call started (a dialog opened, a page responded). 'settle' returns once the target has stopped changing for settleSec (a build finished, a page finished loading).
targetYesWhat to watch: 'full' | 'monitor:<index>' | 'window:<title>' (or window:exe=<app.exe> / window:hwnd=<handle>) | 'region:<x>,<y>,<w>,<h>'.
settleSecNoMode 'settle': how long the screen must stay still (default 1).
exactTitleNoFor window: targets, match the title exactly (default false).
intervalMsNoPause between checks in ms (default 250); each check itself takes ~0.2 s.
timeoutSecNoGive up after this many seconds (default 30). A timeout is a normal result, not an error.
returnImageNoAlso return a screenshot of the final state inline (default true).
pixelThresholdNoHow different (0-255 mean) a cell of about 32x32 screen pixels must be to count as changed (default 12: catches a changed label or a toast).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.39.0
    • addedInput schema / properties / keep
      Added value: +{
      +  "description": "Keep the final screenshot on disk and return its path (default false: it is only returned inline).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / pixelThreshold / description
      Previous value: -"How different an 8 px cell must be to count as changed (default 12)."New value: +"How different (0-255 mean) a cell of about 32x32 screen pixels must be to count as changed (default 12: catches a changed label or a toast)."
  2. First observedv0.32.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses the return payload (duration, changed location, inline final screenshot) and that watching is preferable to a blind sleep. It never explicitly states the call blocks/polls for up to timeoutSec or that it is a read-only, non-mutating operation, which are the remaining gaps.

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?

Three tight sentences: purpose and mode distinction first, then what is returned, then coordinate conventions. No filler and nothing a caller needs is buried.

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 9-parameter UI-observation tool with no annotations and no output schema, the description covers intent, mode selection, and return shape. Missing only blocking/timeout semantics at the description level, which the schema parameters partially cover.

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 genuine meaning by specifying that `regions` use screenshot pixel coordinates (matching find_text/screen_diff) and that `origin` is needed for desktop coordinates. Note the description references an `origin` parameter that does not exist in the schema, which is a minor inconsistency.

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?

States a specific verb and resource (watch part of the screen, return on change or settle) and explicitly frames it against the naive alternative of 'guessing a sleep'. The two modes are named inline, so an agent can distinguish behavior without opening the schema.

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?

Gives concrete situations per mode ('a dialog opened, a page responded' vs 'a build finished, a page finished loading'), which is real routing guidance. It does not say when to prefer screen_diff or find_text instead, only that those share the coordinate convention.

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