Skip to main content
Glama

wait_agents

Block until specified agents stop running or request permission, with a timeout up to 50 seconds. Use this instead of repeated polling to coordinate parallel agent sessions.

Instructions

Block up to timeout_seconds (max 50) until any or all agents stop running or ask for a permission. Prefer this over repeated polling.

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": {
      "ids": "<ids>"
    },
    "name": "wait_agents"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYes
modeNo
timeout_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does disclose the key traits: it blocks, the timeout cap is 50 seconds, and the two wake conditions. It omits what happens when the timeout expires, whether the call returns agent states or output, and whether ids refer to agent identifiers.

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?

Two short sentences, front-loaded with the blocking behavior and the constraint, then the alternative-usage hint. No filler.

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?

For a blocking wait primitive with no annotations, no output schema, and no parameter descriptions, the definition should say what is returned on wake versus on timeout. That gap matters for correct invocation, though the core contract is conveyed.

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 coverage is 0%, so the description must compensate. It explains timeout_seconds (blocking duration, max 50) and implicitly the mode enum via "any or all", but adds no meaning for ids beyond calling them agents, and doesn't clarify default mode or timeout behavior.

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 and resource: block until any or all agents stop running or ask for a permission. That distinguishes it from polling siblings like agent_status, though it never names a sibling explicitly.

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

Usage Guidelines4/5

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

"Prefer this over repeated polling" gives a clear selection rule against the obvious alternative. It stops short of saying when not to use it (e.g., non-blocking contexts or when you need a point-in-time snapshot).

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