Skip to main content
Glama
quochuy
by quochuy

wait_for_task

Block until a task status changes or timeout expires, replacing polling loops. Optionally wait for a specific status; timeouts are normal, re-call to keep waiting.

Instructions

Block (polling, lock-free) until a task's status changes, or until timeout_seconds elapses — use instead of repeatedly calling get_task in a loop. Without until_status, returns as soon as status differs from its value at call time; with until_status, waits specifically for that status. Timing out is a normal result (timed_out: true), not an error — re-call to keep waiting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
until_statusNoWait for this specific status. Omit to wait for any change.
timeout_secondsNoDefault 30, max 55.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses key behaviors: lock-free polling, the change-detection semantics, and that timing out is normal. However, it doesn't specify what happens for an invalid/nonexistent task id or whether any state is modified, leaving a small transparency gap.

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, each earning its place: main action, behavioral modes, and timeout handling. Front-loaded with the key purpose, no wasted words.

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?

While the description covers the main behavior, the absence of an output schema means the return structure remains vague—only 'timed_out: true' is mentioned, not what is returned on a status change. Error handling for non-existent tasks is also unaddressed. Overall good but not fully complete for a tool with no schema.

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 coverage is 67%, and the description adds important semantics beyond the schema: the meaning of omitting versus providing until_status, and the timeout behavior ('timed_out: true' is normal). The id parameter has only a pattern, and the description doesn't elaborate on it, but the schema's enum and description for until_status are reinforced.

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 action: 'Block (polling, lock-free) until a task's status changes, or until timeout_seconds elapses' and explicitly distinguishes from sibling get_task by saying 'use instead of repeatedly calling get_task in a loop.' This clearly identifies the tool's unique role.

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?

Gives explicit direction on when to use: 'use instead of repeatedly calling get_task in a loop.' Also explains the two modes (with/without until_status) and the expected behavior on timeout ('re-call to keep waiting'), providing clear operational guidance.

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/quochuy/ai-coord-mcp'

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