Skip to main content
Glama

runs.wait

Read-only

Block until a run finishes, then return its record — and its report when it completed. Runs take 3–10 minutes; call this instead of polling runs.get in a loop. Returns early with timed_out=true after timeout_secs (default 90, max 240): call it again with the same run_id to keep waiting. Never charged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYesThe run_id returned by runs.launch.
timeout_secsNoHow long this call may wait before returning the current status. Default 90, max 240.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
runNoThe run record (as runs.get).
reportNoThe report (as runs.report) when status is completed, else null.
run_idYes
statusYesrunning | completed | failed | cancelled.
timed_outYesTrue when the wait window elapsed first — call again.
waited_secsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context: it blocks, returns early with timed_out=true after timeout_secs, can be called again with the same run_id, and is never charged. It doesn't describe the exact return structure, but an output schema exists, so that's not required.

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 compact and front-loaded: it states the core behavior first, then timing, then timeout handling, then cost. Every sentence earns its place, and there is no fluff or repetition of schema details.

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

Completeness5/5

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

Given the tool's complexity (blocking wait with timeout), the description covers all essential aspects: what it does, when to use it, how to handle timeouts, cost implications, and the fact that it returns a report. The output schema exists, so return values are already documented. Sibling tools like runs.cancel and runs.launch are distinct enough that no further differentiation is needed.

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 schema already documents both parameters. The description adds context for timeout_secs (default 90, max 240) and run_id (returned by runs.launch), but these are also in the schema. The description's main added value is the behavioral guidance around timeout_secs, not new parameter semantics. Baseline 3 is appropriate.

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 clearly states the tool's purpose: 'Block until a run finishes, then return its record — and its report when it completed.' It uses a specific verb ('block', 'return') and resource ('run'), and distinguishes itself from polling runs.get by explicitly saying 'call this instead of polling runs.get in a loop.'

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

Usage Guidelines5/5

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

The description explicitly tells the agent when to use this tool: instead of polling runs.get in a loop, and how to handle timeouts: 'call it again with the same run_id to keep waiting.' It also provides timing context ('Runs take 3–10 minutes') and notes the tool is 'Never charged,' which helps the agent decide to use it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources