Skip to main content
Glama

wait

Block until a submitted task reaches a terminal state or times out. Get a status snapshot; if it still runs, the result indicates wait_timed_out to check again later.

Instructions

Bounded blocking wait for a task to reach a terminal or blocked state. Does not busy-poll. Returns the snapshot dict; if it still runs when the timeout expires, wait_timed_out=true — call again later. 'submitted'/'running' is NOT completion; only status succeeded/failed/blocked/cancelled/interrupted is.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
timeout_secNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it discloses non-busy-polling, bounded blocking, the returned snapshot dict with wait_timed_out flag, and the exact terminal status set. It does not mention errors or side effects, but for a wait operation this is solid coverage.

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?

Three dense sentences with no redundancy: core purpose, no busy-poll, return/flag behavior, and terminal-status exclusions. The key scoping statement is front-loaded and every sentence earns its place.

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 only two simple parameters and no output schema, the description is complete enough: an agent knows what to pass, what the timeout means, what the response flag indicates, and which statuses count as completion. No critical gap prevents correct invocation.

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 description coverage is 0%, so the description compensates by explaining timeout_sec behavior: if still running, wait_timed_out=true and call again later. It also clarifies that task_id refers to a task awaiting terminal/blocked state. Parameter names and defaults remain in the schema, but the important operational semantics are added.

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?

States a specific verb and resource: 'bounded blocking wait for a task to reach a terminal or blocked state'. It also says 'does not busy-poll', which separates it from inspect (passive status check), run (initiation), and cancel (mutation), so an agent can tell it apart from siblings.

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?

Gives clear usage context: wait until a terminal status, handle timeout by re-calling later, and do not treat 'submitted'/'running' as completion. It does not explicitly name alternatives or when-not-to-use, but the guidance is strong enough to direct an agent to correct usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/BerineYang/native-agent-router'

If you have feedback or need assistance with the MCP directory API, please join our Discord server