Skip to main content
Glama

Wait for a background task

wait_for_task
Read-onlyIdempotent

Wait for a background task to finish, reporting progress along the way.

    kind is the one the starting tool returned: generate, download, import_video, analyze_video,
    score_video or render_video. Returns the finished track (with preview_url), the download_url,
    or the video result. If it is still running when the timeout passes, the result says so:
    call wait_for_task again with the same task_id and kind.
    

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_id": "<task_id>"
    },
    "name": "wait_for_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindNogenerate
task_idYes
timeout_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world behavior, so the description's job is lighter. It adds genuinely useful context beyond them: progress reporting, the three possible return shapes (track with preview_url, download_url, video result), and the explicit timeout/retry loop. It does not state that waiting blocks, or that the timeout is a soft ceiling after which no work is lost.

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?

Front-loaded with the core behavior, then the kind contract, then return values, then the timeout branch; every sentence carries information. Minor waste in re-listing the six kind values that the schema enum already enumerates, and the sentence order puts return values before the retry rule an agent most needs.

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?

An output schema exists, so return values need not be spelled out, yet the description usefully summarizes the three result shapes. For a three-parameter wait tool the coverage is nearly sufficient; the omission of `timeout_seconds` semantics and its 50-second default is the remaining gap an agent would actually hit.

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 description coverage is 0%, so the description must carry parameter meaning. It ties `kind` to the value returned by the starting tool and lists the valid kinds, but `task_id` is only implied and `timeout_seconds` — the parameter that governs the retry loop the description itself describes — is never mentioned. Meaning is partially compensated, not fully.

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 ('wait for a background task to finish') plus an added behavior ('reporting progress'). It is clearly distinguishable from the polling/mutation siblings named in the catalog, so an agent can identify it without opening the schema.

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?

Explains the driving context clearly: use it after a starting tool returns `kind`, and if the task is still running past the timeout, call it again with the same task_id and kind. It does not mention the sibling `get_task` or when a single poll would be preferable to waiting, so the alternative-routing is incomplete.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.