Skip to main content
Glama

wait_any

wait_any
Read-only

Wait until the first task among 1–20 IDs reaches a terminal or needs-user stop, then return its snapshot and all task statuses. Validates all IDs before waiting.

Instructions

等待一组任务中首个到达停点(终态或 needs_user)的任务;返回该任务快照与全部任务当前状态。taskIds 1..20 个,开始前校验全部存在,缺一即报错。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdsYes
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.7.7

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false, idempotentHint=false), so the description adds value by disclosing pre-flight behavior: it validates ALL taskIds exist before starting and errors if any is missing, plus what it returns (first snapshot + all statuses). It does not describe blocking/timeout behavior, which limits it below a 5.

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?

Compact and front-loaded: the core wait semantics lead, followed by the return value and the pre-flight validation constraint. Every clause earns its place; only the omission of timeoutMs keeps it from being optimal.

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

Completeness3/5

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

With no output schema and no annotations governing timing, the description must explain return and blocking behavior. It covers the return payload and validation but omits timeoutMs behavior and what happens on timeout, which is material for a group-wait tool.

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 carry parameter meaning. It partly does for taskIds (restates the 1..20 bound and adds the existence-validation/error semantics), but timeoutMs — a meaningful blocking-control parameter — is not mentioned at all, leaving half the parameters undocumented.

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?

States a specific verb+resource+scope: waits for the FIRST task in a group to reach a stopping point (terminal state or needs_user), and returns that snapshot plus all statuses. The 'first of a group' framing implicitly distinguishes it from the single-task wait_task sibling, but it never names the alternative, so sibling differentiation is only inferred.

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 condition for using it (wait until the first of several tasks stops) is implied by the description, and the 1..20 group constraint is stated, but there is no explicit when-to-use/when-not guidance or naming of the alternative (wait_task) for single-task cases.

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