Skip to main content
Glama

Wait for a batch

wait_batch
Read-onlyIdempotent

Wait up to timeoutMs (default 30000, at most 55000) for a batch to finish and return its status; at the timeout it returns the status so far. Its rate (pagesPerMinute, etaSeconds) says how long the rest should take, so wait again or read get_batch_items.

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_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
timeoutMsNo

Output Schema

NameRequiredDescriptionDefault
statusYes
taskIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / timeoutMs / maximum
      Previous value: -120000New value: +55000
  2. Changed1 schema field changed
    • changedInput schema / properties / timeoutMs / maximum
      Previous value: -90000New value: +120000
  3. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description adds the useful non-obvious behavior that the call blocks up to a bounded time and returns partial status rather than failing at the timeout. It also surfaces the returned rate fields (pagesPerMinute, etaSeconds) as pacing signals. Error behavior (e.g. unknown or cancelled batch id) is not covered.

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?

A single dense sentence front-loads the blocking timeout behavior, then the fallout and next step. No filler, and the most decision-relevant constraint (max 55000) appears early.

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?

With an output schema present, the description need not describe return shapes, and it still highlights the pacing fields an agent needs to decide whether to poll again. The only real gap is the undocumented 'id' semantics and the absence of any failure-mode note for a misspelled or terminal batch id.

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

Parameters4/5

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

Schema coverage is 0%, so the description must carry meaning: it documents timeoutMs's default of 30000 and its cap of 55000, which is not fully derivable from the schema (only the maximum is). The required 'id' parameter is left completely unexplained, relying on the tool name and siblings to imply it is a batch id.

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 and resource ('wait ... for a batch to finish and return its status'), which clearly separates it from the non-blocking read siblings like get_batch. It does not explicitly name get_batch as the alternative, but the polling intent is unambiguous.

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

Usage Guidelines4/5

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

It tells the agent what happens at the timeout ('returns the status so far') and what to do next ('wait again or read get_batch_items'), which is genuine routing guidance. It lacks an explicit statement of when NOT to use this tool (e.g. for already-completed batches, where get_batch suffices).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.