Skip to main content
Glama

wait

Retrieve results from multiple AI agent processes by providing their process IDs, with optional timeout and full metadata output.

Instructions

Wait for multiple AI agent processes to complete and return their results. Defaults to compact result items; set verbose to true for full metadata and detailed parsed output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidsYesList of process IDs to wait for (returned by the run tool).
timeoutNoOptional: Maximum time to wait in seconds. Defaults to 180 (3 minutes). Set to 0 to wait without a timeout.
verboseNoOptional: If true, each result item uses the full result shape including metadata fields and detailed parsed output. Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.26.0
    • changedInput schema / properties / timeout / description
      Previous value: -"Optional: Maximum time to wait in seconds. Defaults to 180 (3 minutes)."New value: +"Optional: Maximum time to wait in seconds. Defaults to 180 (3 minutes). Set to 0 to wait without a timeout."
    • addedInput schema / properties / timeout / minimum
      Added value: +0
  2. First observedv2.21.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the burden of disclosure. It does convey that waiting is blocking until completion and that results are compact by default, with verbose enabling full metadata and parsed output. However, it omits behavior on timeout expiration, partial failures, and invalid or already-cleaned-up pids.

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?

Two focused sentences front-load the core behavior and then explain the verbose option. There is no redundant phrasing, and the structure is easy for an agent to parse quickly.

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?

The tool is simple and the schema covers all parameters well, but there is no output schema and no annotations. The description would benefit from noting timeout behavior, failure handling, and how wait relates to get_result or peek, making it adequate but not fully complete.

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%, so the baseline is 3. The description adds useful context about the verbose parameter and default compact results, but it does not materially expand on timeout semantics beyond what the schema already states.

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 specific action ('wait'), a clear resource ('multiple AI agent processes'), and the outcome ('complete and return their results'). This distinguishes it from run/kill/list siblings, though it does not explicitly name the sibling it differs from, so it misses a 5.

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 provided about when to use wait versus get_result, peek, or list_processes. The schema mentions that pids come from the run tool, but the description itself gives no explicit context for choosing this tool over alternatives.

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