Skip to main content
Glama

pir_wait_for_change

Monitor a screen region and block until it changes or a timeout expires, returning a change flag and score. Ideal for waiting on UI updates, dialog closures, or page loads.

Instructions

Block until the region looks different from how it looked when this call started, or until timeout_ms. Returns changed=true with the score, or changed=false with the largest score seen. Use it as a doorbell: 'wake me when the build output moves', 'when the dialog closes', 'when the game loads'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
metricNowhat the threshold applies to. rmse (default): the whole region moved. peak: any single cell moved, for a small thing that should tick inside a larger region (a clock in a bar).
thresholdNoscore that counts as a change, 0..1 (default 0.05). With metric=rmse a caret or cursor edge scores about 0.02 and a dialog opening 0.1+. With metric=peak a digit flipping in one cell scores about 0.05-0.2.
timeout_msNogive up after this long (default 55000, max 540000)
interval_msNosampling period (default 500)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does so well: it discloses blocking semantics, timeout behavior, and both return outcomes. It does not discuss side effects or prerequisites like having the region already defined, but as a read/observe tool those are less critical.

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 plus examples carry the core definition, return behavior, and use cases with no fluff. The mechanism is front-loaded and the examples are concrete rather than 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 blocking wait tool with no output schema and no annotations, the description covers the essential return values, timeout, and representative use cases. It could be more complete by stating that the region must already exist or be defined, but the core agent-facing contract is adequately specified.

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 high (80%), so the baseline is 3; the description adds little parameter-level detail beyond what the schema already provides. The one uncovered parameter, name, is not described in either place, and the description doesn't help resolve the schema's contradictory timeout max (540000 in text vs 9007199254740991 in maximum).

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 precise behavior: block until the region changes from its starting state or until timeout_ms. It also defines the return contract (changed=true with score, changed=false with largest score), which makes the tool's purpose unmistakable and differentiable from wait_for_stillness.

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 'doorbell' framing plus concrete examples (build output moves, dialog closes, game loads) gives the agent clear when-to-use guidance. It doesn't explicitly mention when not to use it or name wait_for_stillness as the inverse alternative, so it stops short of a 5.

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