Skip to main content
Glama

Wait for tasks

tg_wait_tasks
Read-only

Wait for given tasks to finish or require approval, up to a timeout, then return their final state with progress updates—use instead of polling task status.

Instructions

Wait until the given tasks finish (or need the user's approval), up to timeout_s, and return their final state. Sends progress notifications when the client supports them. Use this instead of polling tg_tasks.

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": {
      "task_ids": "<task_ids>"
    },
    "name": "tg_wait_tasks"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idsYes
timeout_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover read-only and non-destructive safety, so the bar is lower; the description still adds blocking semantics, the approval escape hatch, the timeout bound, and progress notifications. It does not say what is returned when the timeout expires.

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 sentences, front-loaded with the action and terminating conditions, then side effects, then the alternative. No redundant wording.

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?

Complete enough for a two-parameter blocking wait with annotations and no output schema: blocking behavior, approval condition, timeout, and notifications are all stated. The unaddressed timeout outcome is the only material omission.

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; it implies task_ids ('given tasks') and timeout_s ('up to timeout_s') with an _s suffix implying seconds. It never explains where task_ids come from or how timeout expiry affects the result.

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 (wait), resource (given tasks), terminal conditions (finish or need user approval), bound (up to timeout_s), and return (final state), and names tg_tasks polling as the thing it is not.

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?

Explicitly says to use this instead of polling tg_tasks, a clear selection rule. It omits when-not cases, such as using tg_task_control to cancel or abort a task.

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