Wait for run
wait_for_runPoll a run until completed, failed, cancelled, or the timeout (default 45 seconds, max 90). Call this at most ONCE after create_design or update_design, using that run's run_id. If still_running, do not share a previous viewer_url. If concurrency_notice is present, show it. If the result includes still_running: true, do not call this tool again unless the user explicitly asks to keep waiting — show job_id and the new run_id. Offer notify_run_email only if they have not already asked to be emailed.
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>",
"run_id": "<run_id>"
},
"name": "wait_for_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| run_id | Yes | ||
| timeout_sec | No | Seconds to poll before returning still_running (default 45, capped at 90). Do not raise this to keep looping. | |
| interval_sec | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| job_id | No | ||
| run_id | Yes | ||
| status | Yes | ||
| log_tail | No | ||
| next_step | No | ||
| charge_usd | No | ||
| created_at | No | ||
| viewer_url | No | ||
| commit_hash | No | ||
| completed_at | No | ||
| notify_email | No | ||
| summary_diff | No | ||
| still_running | No | ||
| concurrency_notice | No | ||
| previous_preview_stale | No |