Skip to main content
Glama

wait_for

Read-only

Waits for a selected device to meet a condition—such as visible text, element, foreground app, or readiness—or until timeout. Use it to synchronize automation with device state changes.

Instructions

Observe a selected device until a supported condition is met or the timeout expires. Conditions can check visible text, an element, foreground app, or readiness.

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": {
      "condition": "<condition>"
    },
    "name": "wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
conditionYes
device_idNo
timeout_msNo
poll_interval_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare read-only, non-destructive, open-world behavior. The description adds that observation continues until the condition is met or the timeout expires, which is useful behavioral context. It does not explain what happens on timeout, whether the call blocks, or how polling works.

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?

The description is two tightly written sentences with the core behavior front-loaded. Every sentence contributes useful information, and there is no redundant or filler wording.

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

Completeness2/5

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

The tool has a complex `oneOf` condition schema, four parameters, no output schema, and only safety-oriented annotations. The description provides a high-level overview but omits critical invocation details such as timeout behavior, polling interval semantics, device selection, and condition syntax. It is not complete enough for an agent to call the tool confidently without studying the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for four undocumented parameters. It names the condition categories (text, element, foreground app, readiness), partially covering the complex `condition` parameter. It says nothing about `device_id`, `timeout_ms`, `poll_interval_ms`, or the nested matching fields and sources.

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?

The description states a specific verb and resource: observe a selected device until a condition is met or timeout expires. It also names the supported condition categories, making the tool's scope clear. It does not distinguish this tool from the sibling `wait` tool, so it falls short of full sibling differentiation.

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

Usage Guidelines3/5

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

The description implies usage by explaining that it waits for supported conditions on a selected device. However, it gives no explicit when-to-use guidance, no exclusions, and no alternatives such as the sibling `wait` tool. The agent must infer the appropriate context.

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