wait_for_job
Waits for a job to reach a terminal state (done, failed, cancelled, etc.) or timeout. Returns final status and score, avoiding polling loops.
Instructions
Block until a job reaches a terminal state (done/failed/cancelled/rejected/interrupted) or the timeout expires. Returns the final status and score. Preferred over polling get_job_status in a loop. For non-MCP coordinators: subscribe to Redis pub/sub channel cca:job:done:{job_id} for instant zero-copy notification — the payload is JSON with fields: job_id, status, score, score_source, finished_at, exit_code.
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 | Job ID to wait for | |
| timeout_seconds | No | Maximum seconds to wait (default 300) |