Skip to main content
Glama
ZenRows
by ZenRows

batch_wait

Read-only

Poll a batch job's status until it reaches a terminal state: completed, failed, stopped, or deleted. Use it to wait for results and detect API key credit cap failures.

Instructions

Poll batch_status until the job reaches a terminal state (completed, failed, stopped, or deleted). A run that hits an API key credit cap ends as failed with failure_reason api_key_cap_reached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesBatch job id
timeout_msNoMax wait time in ms (default 600000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.7.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations already declaring readOnly/openWorld/non-destructive, the description adds real context beyond them: the exact set of terminal states, and the credit-cap failure mode including the failure_reason value 'api_key_cap_reached'. It omits what happens when timeout_ms elapses before a terminal state, which is a notable gap for a wait tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences, front-loaded with the core action and its terminating condition, with the failure detail appended only where it adds value. No wasted phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a wait/poll tool with annotations covering its safety profile and no output schema, the key facts an agent needs (what it polls, when it stops, one failure mode) are present. The missing piece is the behavior when timeout_ms expires without a terminal state, which an agent would want to know.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so job_id and timeout_ms (with its default of 600000) are fully documented in the schema. The description adds no parameter-level meaning beyond that, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Poll') plus the resource it wraps ('batch_status') and enumerates the terminal states that end the wait. It implicitly differentiates from the sibling batch_status by describing the blocking-until-terminal behavior, though it never names batch_status as the non-blocking alternative directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It conveys the usage context (wait until a job is done) through the enumeration of terminal states, which tells an agent this tool blocks rather than returning immediately. However, there is no explicit when-to-use vs when-not guidance, e.g. when a single non-blocking batch_status check is preferable, so usage is only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.