Wait for a deployment to finish, and get the evidence in one answer
wait_for_deployment⭐ CALL THIS INSTEAD OF POLLING. Waits up to 50 seconds per call (an MCP client cuts a call at about 60 s) for the deployment to reach a TERMINAL state (ready, build_failed, error or vm_missing) and returns, in ONE response, everything you would otherwise fetch afterwards: the HTTP status of the PUBLIC url (not the VM's private interface, which can answer 401 while the public path still 502s), the container table with health and restarts, the host's memory/disk/load, and the .env KEY NAMES. Do NOT loop on get_deployment: that is 8-9 round trips per deploy that learn nothing, and then three more asking for what this already returned. ⚠️ A TIMEOUT IS NOT A FAILURE: if it returns timed_out:true the build is simply still running, so call it again (a typical deploy takes 2 to 5 calls). Only status decides success. On build_failed or error, call get_deployment(id) for the full build_log, which is the diagnosis.
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": {
"id": "<id>"
},
"name": "wait_for_deployment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Deployment id, from the deploy call or list_deployments. | |
| timeout_s | No | Seconds to wait in this call before returning timed_out:true: at most 50 (the default); a larger value waits 50, because an MCP client cuts a call at about 60 s (ROADMAP 7). Call again until it is terminal. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| note | No | ||
| error | No | ||
| status | No | ||
| details | No | ||
| message | No | ||
| evidence | No | ||
| recovery | No | ||
| terminal | No | ||
| timed_out | No | ||
| deployment | No | ||
| validation | No | ||
| waited_seconds | No | ||
| account_notices | No |