Skip to main content
Glama

Wait for a setup condition

qa_wait
Read-only

Waits for device_online, metro_ready, wda_ready, or simulator_booted conditions instead of shell sleep; returns satisfied or timedOut to retry.

Instructions

Wait for a setup condition instead of shell sleep: device_online (adb), metro_ready, wda_ready (after qa_wda start returned status:"starting"), or simulator_booted (the bound iOS Simulator, after qa_ios boot returned status:"booting"). Returns satisfied, or timedOut:true (call again). Jobs: qa_job_status waitMs.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sessionId": "<sessionId>",
      "for": "<for>"
    },
    "name": "qa_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
forYes
sessionIdYes
timeoutMsNodefault 45000; values above SWIPIUM_MAX_WAIT_MS (default 50000) are clamped. On timedOut, call again to keep waiting.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare a safe read-only, closed-world operation, so the bar is lower. The description adds real value by disclosing return values (satisfied vs timedOut:true) and the retry rule plus the SWIPIUM_MAX_WAIT_MS clamp, but it does not say whether waiting consumes the timeout budget or what happens to sessionId scope.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core intent and the sleep alternative, then the enum semantics, then return values. It is dense and somewhat telegraphic, but nearly every clause carries operational meaning; the parenthetical status:"starting"/"booting" conditions are especially useful.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter blocking tool with no output schema, it covers what to wait on, when each condition applies, what a return looks like, and what to do on timeout. Nothing an agent needs to invoke it correctly is missing.

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 33%, yet the description supplies the meaning of all four enum values for 'for' by tying each to a precondition state, and reinforces the timeout clamp/retry behavior that the schema documents for timeoutMs. Only sessionId is left implicit, which is a minor gap.

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?

Names a specific verb (wait) and the exact set of resources (four named setup conditions), and explicitly contrasts itself with shell sleep. An agent can tell it does not perform actions but blocks on a named precondition.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives per-condition usage context: wda_ready is to be used after qa_wda start returned status:"starting", simulator_booted after qa_ios boot returned status:"booting", and job waiting is routed to qa_job_status waitMs instead. That is an explicit when-to-use and an explicit alternative.

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