Skip to main content
Glama

wait_for

Pauses automation until on-screen text appears or disappears, an app is in front, or the screen settles, then reports success with elapsed time or timeout instead of guessing a delay.

Instructions

Wait until something happens on the screen, instead of guessing a delay: text appears (a page loaded, a message arrived), text goes (a spinner, "Sending…"), an app comes to the front, or the screen settles. Returns OK with how long it took, or TIMED OUT.

Input Schema

NameRequiredDescriptionDefault
appNoApp name or package that should be in front
goneNoText that should go
textNoText that should appear
settledNoUntil the screen stops changing
timeout_msNoDefault 8000, max 30000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.2.21

TDQS

A4.1/5.0
Behavior4/5

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

No annotations, so the description carries the burden: it discloses the success return ('OK with how long it took') and the failure mode ('TIMED OUT'), which is meaningful behavioral context. It omits whether the call blocks/errors when zero conditions are supplied, and whether conditions are ANDed or ORed.

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?

One dense sentence enumerating the conditions, followed by a one-line return contract. No filler, and the primary behavior is front-loaded before the return-value sentence.

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 5-param, zero-required tool with no annotations and no output schema, the description covers what it waits on and what it returns. Combination semantics for multiple parameters and behavior when none are given remain undocumented, which matters for an all-optional-parameter tool.

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 earns above baseline by grounding each parameter in concrete semantics ('text appears (a page loaded, a message arrived)', 'a spinner, "Sending…"', 'an app comes to the front', 'the screen settles'). The critical unresolved gap is whether multiple supplied conditions are combined conjunctively or disjunctively.

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?

States a specific verb+resource: block until one of four named screen conditions occurs (text appears, text goes, app foregrounded, screen settles). The phrase 'instead of guessing a delay' contrasts it with delay-based waiting, though it never names the sibling 'wait' tool explicitly.

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 clear context for when this is appropriate ('wait until something happens on the screen') and a negative case ('instead of guessing a delay'). It does not address how to combine conditions or which sibling to fall back on when no screen signal is available.

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