Skip to main content
Glama

wait

Wait for a specified UI readiness condition—duration, text, selector, or stable screen—before proceeding. Extend the default 90-second timeout with a caller-supplied budget.

Instructions

Wait for a duration, text, snapshot ref, selector, or stable UI. Use text, ref, or selector for a specific readiness condition; stable waits until the UI stays quiet for the requested window. Times out after 90s; a caller-supplied budget extends it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNo
refNo
kindNo
textNo
udidNoiOS device UDID selector.
debugNoEnable debug diagnostics.
depthNo
runIdNoLease run identifier.
scopeNo
deviceNoDevice name selector.
serialNoAndroid device or Vega VVD serial selector.
stableNo
targetNoAlias for deviceTarget on commands without a UI target field. Interaction commands reserve target for the UI element.
tenantNoRemote tenant identifier.
leaseIdNoExisting lease identifier.
quietMsNo
sessionNoAgent-device session name.
noRecordNoDo not record this action.
platformNoPlatform selector used to resolve a device.
selectorNo
timeoutMsNo
durationMsNo
includeCostNoInclude per-command agent-cost (cost.wallClockMs, …) in structuredContent. Defaults to off; the default response shape is unchanged.
deviceTargetNoDevice target form. Maps to the CLI --target flag.
responseLevelNoResponse verbosity: token-cheap digest / default (today) / full. Defaults to default; the default response shape is unchanged.
mcpOutputFormatNoMCP text content format. Defaults to optimized agent-friendly text; use json for JSON text. Structured content is always returned separately.
androidDeviceAllowlistNoAndroid serial allowlist used for device resolution.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hintNo
kindNo
textNo
warningNo
capturesNo
selectorNo
waitedMsYes
nodeCountNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the default timeout, the ability to extend it, and the distinct semantics of stable waiting versus condition-based waiting. It does not state whether a timeout results in an error or what the return shape is, but the core behavior an agent must understand before calling is present.

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 dense sentences deliver the full purpose, mode guidance, and timeout behavior with no filler. The most important information is front-loaded, and every clause earns its place.

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?

Despite 27 parameters, the description covers the essential wait-specific decisions: which mode to use and the timeout behavior. The output schema exists, so return values need not be spelled out, and many shared parameters are already documented in the schema. It leaves minor gaps around exact parameter names for duration and quiet window, but is complete enough for an agent to invoke the tool correctly in most cases.

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 only 59%, and several wait-critical parameters (kind, durationMs, quietMs, timeoutMs, stable) lack descriptions. The description compensates by explaining what 'duration', 'text', 'ref', 'selector', and 'stable' modes mean, and by relating the quiet window and timeout budget to the wait behavior. It does not explicitly map 'duration' to durationMs or 'budget' to timeoutMs, but it adds meaningful semantic value beyond the raw schema.

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 uses a specific verb ('Wait') and identifies concrete target resources: duration, text, snapshot ref, selector, and stable UI. This clearly distinguishes it from sibling tools like get, snapshot, or is by framing it as a readiness/synchronization operation rather than a query or assertion.

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 explicit mode-selection guidance: text, ref, or selector for specific readiness conditions, and stable for waiting until the UI quiets. It also explains the 90-second timeout and how a caller-supplied budget extends it. It does not explicitly contrast this tool with non-wait alternatives like polling via get or snapshot, but the internal usage guidance is clear and actionable.

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/callstack/agent-device'

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