Skip to main content
Glama

opencode_wait_for_task

Long-poll delegated tasks until completion or timeout. Use 'all' mode to wait for all tasks, or 'any' to return when one finishes.

Instructions

Long-poll one or more delegated tasks until they finish or the timeout elapses. Use mode 'all' to wait for all tasks, or 'any' to return as soon as one completes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo'all': return when all tasks finish, 'any': return when one finishesall
task_idsYesIDs of tasks to wait for
timeout_msNoMax time to wait in milliseconds (default 120000)
poll_interval_msNoTime between status checks in milliseconds (default 2500)
Behavior3/5

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

With no annotations, the description must disclose behavioral traits. It mentions long-polling and timeout but lacks details on what happens on timeout (e.g., error, null return), error handling, and concurrency behavior. The polling interval is not addressed in the description, only in the schema.

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 extremely concise with two sentences, covering the core purpose and modes without waste. Every sentence adds value, making it easy to scan.

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?

Given the tool has 4 parameters, no output schema, and no annotations, the description is somewhat incomplete. It explains the waiting behavior and modes but does not describe the return type or error conditions. The agent would need additional context to fully understand the tool's behavior.

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 coverage is 100%, so baseline is 3. The description adds minimal value beyond the schema: it repeats the mode enum values and implies timeout, but does not explain poll_interval_ms or provide additional context for task_ids. The description does not significantly enhance parameter understanding.

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: to long-poll one or more delegated tasks until completion or timeout. It distinguishes from siblings like opencode_get_task_status (single check) and opencode_get_task_result (retrieve results after completion), showing it's for waiting.

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 explains when to use this tool (to wait for task completion) and describes two modes (all and any), providing clear context. However, it does not explicitly state when not to use it or mention alternatives, leaving minor room for improvement.

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/alejandro-technology/opencode-mcp'

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