download_wait
Wait for a background download to complete using its job ID, blocking until it finishes or fails. Returns final status, or latest progress if the timeout expires while still running.
Instructions
Wait for a background download to finish, then report — for a watcher.
Give the job_id from download_query. Blocks inside the server and returns as soon as the download completes or fails, or after timeout_s (capped at 120s) with the latest progress if still running. This is the efficient way to follow a job: a delegated background watcher calls it in a loop and stops when status is "completed" or "failed", so the main conversation is never blocked on sleeps. Prefer this over repeated sleep+download_status. An unknown id returns status="not_found".
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": "download_wait"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| timeout_s | No |