Skip to main content
Glama

wait_for_agents

Wait for delegated child agents to complete or require approval, returning when any or all settle or the timeout expires without stopping them; use since to track only newly settled agents.

Instructions

Event-driven join; returns on any/all completion, approval, or timeout without stopping agents. Pass since to wait only for agents that settle after that timestamp; newly_settled identifies them. Results are capped at 4000 characters by default; set max_result_chars to override. Maximum 60 seconds.

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": {
      "agents": "<agents>"
    },
    "name": "wait_for_agents"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo
sinceNoOnly agents settled after this timestamp count toward readiness.
agentsYes
timeout_secondsNo
max_result_charsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.0
    • addedInput schema / properties / max_result_chars
      Added value: +{
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / since
      Added value: +{
      +  "description": "Only agents settled after this timestamp count toward readiness.",
      +  "format": "date-time",
      +  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does substantial work: it discloses non-destructiveness ('without stopping agents'), the three return conditions, a hard 60-second ceiling, and a 4000-character default result cap with an override. It still omits what the response envelope looks like beyond naming 'newly_settled' and whether a timeout counts as an error.

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?

Four short sentences, front-loaded with the core semantics and with no filler; each sentence introduces a distinct behavior. The clipped fragment 'Maximum 60 seconds.' is slightly terse but still earns its place.

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?

For a five-parameter blocking/wait tool with no annotations and no output schema, the definition covers the critical unknowns: blocking cap, result truncation, non-destructive semantics, and incremental polling. The remaining gap is the shape of the return payload on timeout versus completion.

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 20%, but the description compensates well by explaining 'since' (settle-after filtering), 'mode' semantics (any/all), 'max_result_chars' (overrides the 4000-char default), and the 60-second timeout ceiling. Only the required 'agents' array is left implicit, which its name adequately conveys.

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?

The opening clause names the exact operation ('event-driven join') plus the trigger conditions (any/all completion, approval, or timeout) and explicitly distinguishes itself from the stop_agents sibling by stating it returns 'without stopping agents'.

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?

It explains the incremental-polling pattern via 'since' and 'newly_settled', which implies repeated use in a wait loop, but it never states when to choose this over get_agent_result or list_agents, nor what to do after a timeout.

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