Skip to main content
Glama

wait_ref

Wait for a specified @eN reference to reach a target state, with optional timeout and session targeting.

Instructions

Wait until an @eN ref reaches a state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes@eN ref from the last snapshot.
leaseNoOptional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env.
stateNovisible|hidden|attached|detached
sessionNoOptional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'.
timeout_msNoTimeout in ms.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only says 'wait... reaches a state' and does not disclose that the call blocks, how long it may poll, what happens on timeout, whether errors are raised, or whether the lease/session context affects behavior. A mutation/blocking tool without annotation coverage needs substantially more.

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?

The sentence is short, clear, and waste-free, containing the verb, the target resource, and the expected outcome. It would score higher if the same economy had been used to include key behavioral caveats, but as pure conciseness, it is well-formed.

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 five parameters, no annotations, and no output schema, so the description must carry contextual weight. It does not mention what happens when the state is never reached, what return value indicates the outcome, how polling works, or when presenting a lease is relevant. Given the timeout and session parameters, an agent cannot fully reason about the call from the description alone.

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 description coverage is 100%, and every parameter (ref, lease, state, session, timeout_ms) already has a meaningful schema-level description. The prose adds no parameter semantics beyond saying '@eN ref' and 'reaches a state,' which is baseline for fully documented schemas.

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 concrete operation: wait until an @eN ref reaches a state. This is enough to distinguish it from sibling waiters like wait_selector, wait_url, and wait_load at a glance, and it correctly points at the ref-based workflow. It stops short of a 5 because it does not name the possible states or directly contrast itself with is_state, which checks the same kind of condition.

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

Usage Guidelines2/5

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

No guidance is given for when to use this tool versus alternatives such as is_state, wait_selector, or wait_url. There is no mention of prerequisites (e.g., last snapshot), no suggested wait strategy, and no indication of when a ref-based wait is preferable. The description leaves all usage decisions to the agent.

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