Skip to main content
Glama

wait

Block execution until all specified jobs reach a terminal state, then return. Configure a timeout up to 60 seconds to prevent indefinite blocking.

Instructions

Wait for one or more jobs to finish, returning early when all are terminal. Timeout is capped at 60 seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idsYes
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It adds useful details beyond the schema, such as returning early when all jobs are terminal and a 60-second timeout cap. However, it does not disclose what happens when the timeout expires, what the return value contains, or whether waiting has side effects.

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?

The description is a single sentence with no filler, front-loading the core action and then adding the key behavioral constraint. Every clause earns its place.

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?

This is a simple two-parameter tool, and the description covers the essentials of waiting and early return. However, without an output schema or annotations, the absence of timeout-expiration behavior and return-value semantics leaves a meaningful gap for an agent deciding whether the call succeeded.

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 0%, so the description must compensate. It maps job_ids to 'one or more jobs' and relates timeout_ms to the 60-second cap, but it leaves out the default timeout, the unit context, and how zero or missing timeout_ms should be interpreted.

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 description states a specific verb ('wait for'), a clear resource ('one or more jobs'), and a precise completion condition ('returning early when all are terminal'). This distinguishes it from sibling status-checking tools like status and result by making the blocking behavior explicit.

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?

The description clearly implies the use case: block until jobs reach a terminal state rather than polling status or fetching results. It does not explicitly name alternatives or exclusion conditions, but the purpose is unambiguous enough for an agent to select it.

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