wait_for_task
Poll a task until it reaches a terminal state (SUCCEEDED, FAILED, CANCELED) and receive the final result with download URLs. Avoids manual polling loops.
Instructions
Poll a task until it reaches a terminal state (SUCCEEDED, FAILED, or CANCELED). Returns the final task result with download URLs. Use this instead of manually calling _get in a loop.
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_type": "<task_type>",
"task_id": "<task_id>"
},
"name": "wait_for_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_type | Yes | The type of task to poll | |
| task_id | Yes | Task ID to poll | |
| poll_interval | No | Seconds between polls (default 5) | |
| timeout | No | Maximum seconds to wait (default 300) |