Wait for Job
wait_jobWait for a long-running job and return the resolved result — a bounded long-poll. Includes template preparation (kind="template", id=jobId), media import, render, compose, consult, suggestions and preview. If still running, call wait_job again with the same arguments; work continues server-side.
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": {
"kind": "<kind>",
"id": "<id>"
},
"name": "wait_job"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | kind="media": mediaItemId returned by import/generate/finalize/import_resource. kind="render": renderId. kind="compose": composeJobId. kind="consult": consultJobId. kind="suggestions": mediaItemId. Generic kinds use the jobId from the enqueue receipt. | |
| kind | Yes | What to wait on, including template preparation (kind="template"). | |
| projectId | No | Required when kind="render", "compose", or "consult". | |
| timeoutMs | No | Maximum wait in ms (default 30 min for render/compose, 5 min for suggestions). | |
| imageIndices | No | Read these 1–4 original zero-based image artifact indices from this completed job, in this order. Does not render again. Same arguments repeat the same selection; omit for the first four. |