Skip to main content
Glama

wait_generation

Read-onlyIdempotent

Wait for a generation to finish (long-poll up to wait_seconds, then returns current status). Call repeatedly until status is COMPLETED, FAILED or CANCELED. Returns output URLs (and an inline image preview) when done.

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": {
      "request_id": "<request_id>"
    },
    "name": "wait_generation"
  }
}

Input Schema

NameRequiredDescriptionDefault
request_idYes
wait_secondsNo
include_previewNo

Output Schema

NameRequiredDescriptionDefault
errorNo
modelYes
stageYes
outputYes
statusYes
versionYes
progressYes
snapshotYes
terminalYes
warningsNoExecution notices for this request. Absent when there are none. Example: code "audio_dropped" — the audio track did not pass the safety check of the model, so the video has no sound; the price is unchanged. Skip codes you do not know.
next_stepNo
created_atYes
media_kindYes
request_idYes
completed_atYes
cost_creditsNo
next_poll_msYes
schema_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Adds meaningful behavior beyond annotations: it long-polls for up to wait_seconds, returns current status, and returns output URLs plus an inline image preview when done. The annotations already cover read-only/idempotent/non-destructive semantics, so this is solid additional context, though it omits what happens on invalid request_id or timeout edge cases.

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 compact sentences, front-loaded with the core purpose, followed by operational guidance and return behavior. No wasted 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?

Given an output schema exists and annotations cover safety traits, the description is nearly complete for correct invocation: it explains polling, terminal states, and return behavior. Minor gaps around error handling and the request_id parameter prevent a 5.

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 compensate. It explains wait_seconds as the long-poll duration and implies include_preview via "inline image preview," but it never mentions request_id, the default wait_seconds value of 25, the 1–30 range, or the include_preview default of true.

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: waiting for a generation to finish, with the long-poll behavior described. The phrase "long-poll up to wait_seconds, then returns current status" clearly distinguishes this from the sibling get_generation, which presumably returns status once without 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?

Explicitly says to call repeatedly until status is COMPLETED, FAILED, or CANCELED, giving clear polling-loop guidance. It does not explicitly say when not to use this tool or name get_generation as the one-shot alternative, which keeps it from a 5.

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.