wait_for_job
Polls a media generation job until it completes and returns the result. Use when you need the final output without polling manually.
Instructions
Wait for a media generation job to complete — polls until the image, video, or audio is ready or the timeout is reached. Use this to get the final result without manually calling get_job_status in a loop. Returns the completed job on success or an error if the timeout expires.
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": {
"jobId": "<jobId>"
},
"name": "wait_for_job"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | The media job ID to wait for (e.g. "mjob_..."). | |
| timeoutSeconds | No | Maximum seconds to wait before giving up (default: 300). |