wait_for_generation
Poll generation status until it reaches done or failed, then return the terminal record with image URLs for checking success. On timeout, indicates the call should be repeated.
Instructions
Poll get_generation on a backoff until it reaches done / failed.
Args:
uuid: The UUID returned by ``generate``.
timeout_s: Return after this many seconds even if still running.
Default 45 stays under the 60 s per-call limit most MCP clients
enforce; a ``timeout`` result just means "call again". Only raise
it (e.g. for video) on clients you know allow long tool calls.
Returns:
The terminal generation record — which includes generations that
failed server-side: those are SUCCESSFUL tool calls returning
``processing_state: "failed"`` with empty ``image_urls``, so always
check the state. On tool failure, an ``isError`` result whose
``error`` field is ``"timeout"`` (``message`` names the last
observed state — the generation keeps running server-side and can be
re-fetched with ``get_generation`` later), ``"auth"``, or
``"failed"``.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | ||
| timeout_s | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||