Skip to main content
Glama

wait_task

Blocks until an async task finishes or the timeout expires, optionally sending stdin and returning incremental stdout/stderr output by offset.

Instructions

Wait up to maxWaitSec (default 45s) for an async task to finish. Supports optional sendInput (stdin for shell tasks) and incremental stdoutOffset/stderrOffset.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "taskId": "<taskId>"
    },
    "name": "wait_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawNo
pollMsNo
taskIdYes
sendInputNo
maxWaitSecNo
stderrOffsetNo
stdoutOffsetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the default/maximum wait, that sendInput acts as stdin for shell tasks, and that offsets are incremental, but it omits what happens on timeout, whether partial output is returned, how pollMs affects behavior, and what the response contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the core bound ('Wait up to maxWaitSec (default 45s)') front-loaded and no filler. Density is high; the parenthetical abbreviations are compact rather than wasteful.

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

Completeness4/5

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

For a 7-parameter blocking tool with no annotations and no output schema, the description covers the essential calling semantics but leaves the return shape and timeout behavior unexplained. Missing pollMs is the main gap.

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 0%, so the description must compensate, and it does add real meaning for four of seven parameters (maxWaitSec default/cap, sendInput as stdin, incremental stdoutOffset/stderrOffset). However, taskId, pollMs, and raw are left entirely to the bare schema, including a pollMs range of 200-5000 that is never explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Wait') and resource ('an async task to finish'), with the blocking semantics and the maxWaitSec bound made explicit. It is distinguishable from get_task_status or cancel_task by implication (blocking wait vs. status check vs. cancellation), though it never names those siblings.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer 'use this when you want to block until a task completes rather than polling'. There is no explicit when-to-use, when-not-to-use, or guidance on choosing between this and get_task_status, and no mention of what to do on timeout.

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