batch_wait
Poll a Batch job until its run ends (completed, stopped or failed) or pauses, and return its status and stats like batch_status. If the wait runs out first, it returns the current state with ok:true, timed_out:true and a note: call batch_wait again. A paused run returns at once with paused:true (it does not move until batch_resume). A failed run answers ok:false with error.code and server_code (insufficient_credits, subscription_inactive or api_key_cap_reached). Transient poll errors are retried. A call that carries a progressToken gets a progress notification after each poll.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | Batch job id returned by batch_create or batch_list | |
| timeout | No | Max wait in seconds (default 50). Many MCP clients cancel a call after 60 s. | |
| timeout_ms | No | Deprecated: the same wait in milliseconds. Use the seconds parameter instead. |