Wait for generation
wait_for_generationPoll 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"``.
**Follow-up actions:** A ``done`` generation's
``processing_result.available_actions`` maps slot indices to valid
action types — e.g. ``{"0": ["upscale_2x", "vary_strong",
"pan_left", "zoom_out_2x", "img2vid_basic", ...], "global":
["reroll"]}``. Use ``execute_action`` with the ``uuid``, a chosen
``action_type``, and the ``parent_image_index`` (the slot key as an
int) to run an action on a specific output image.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Generation UUID to poll. | |
| timeout_s | No | Max seconds to wait before returning a timeout result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||