wait_for_job
Polls a job until it reaches a terminal status—succeeded, failed, or cancelled—then returns the result; optionally stop after a timeout and return the last known state.
Instructions
Wait for a job to reach a terminal status (succeeded, failed, or cancelled) using API long polling, then return it.
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": {
"job_id": "<job_id>"
},
"name": "wait_for_job"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The job ID to wait on. | |
| timeout_seconds | No | Give up after this many seconds and return the last known job state. Defaults to 300, max 1800. |