Skip to main content
Glama

Wait for any of several subagent invocations

wait_any
Read-onlyIdempotent

Wait up to five minutes for any of several agent invocations to finish or report a blocker, returning ready results while the others keep running.

Instructions

Wait up to five minutes for the first of several invocations to finish or report a blocker.

reason=ready returns every listed invocation that is finished or has an unread blocker, in wait_agent's shape; the others keep running and are not in updates. Only the blockers returned are consumed; a later wait still returns the rest. Finished invocations stay ready on every call, so drop them from the next list. reason=wait_elapsed returns a running snapshot of each and consumes nothing. Empty, repeated, unknown or expired IDs reject the whole call before waiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invocation_idsYesDistinct invocation IDs returned by start_agent; all must be known.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYes
updatesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.17.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds genuinely useful behavior beyond them: the five-minute ceiling, that finished invocations remain ready on every call, that only returned blockers are consumed while the rest survive, and that the call fails fast on empty/repeated/unknown/expired IDs. Minor tension with readOnlyHint exists in the 'consumes' semantics, but consumption is scoped to unread blocker markers rather than the invocations themselves.

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 purpose is front-loaded and each subsequent clause carries a distinct, actionable fact (timeout, consumption, retry behavior, error handling) with no filler. It is dense and slightly run-on, but nothing reads as redundant padding.

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?

With an output schema present the description need not detail return fields, yet it still points to wait_agent's shape and explains the ready vs wait_elapsed snapshots. Combined with the annotated safety profile and fully documented single parameter, the definition is sufficient; only the missing 'reason' selector keeps it short of complete.

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% for the single parameter, so the baseline is 3. The description adds real meaning over the schema: the all-or-nothing validation rule ('reject the whole call before waiting') and the constraint that IDs must be known/distinct. It does reference a 'reason=ready'/'reason=wait_elapsed' selector that does not appear in the input schema, which slightly muddies the parameter story.

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 opening sentence names a specific verb and resource and pins the scope precisely: 'Wait up to five minutes for the first of several invocations to finish or report a blocker.' The 'several'/'first' framing implicitly separates it from the single-invocation wait_agent sibling, but no sibling is named as an alternative, so differentiation is left to inference.

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?

Usage is implied by the semantics ('reason=ready returns every listed invocation that is finished...; reason=wait_elapsed returns a running snapshot'), so an agent can infer which mode yields which behavior. However, there is no explicit when-to-use/when-not guidance and no routing against wait_agent, wait_round, or list_invocations, all of which overlap.

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