Skip to main content
Glama

Wait for a batch

wait_batch
Read-onlyIdempotent

Wait up to timeoutMs (default 30000, at most 120000) for a batch to finish and return its status; at the timeout it returns the status so far, so wait again or read get_batch_items.

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: -90000New value: +120000
  2. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds useful behavioral detail: the default and maximum timeout, and that a timeout returns the status so far rather than failing.

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?

The description is a single well-packed sentence with no wasted words. Purpose, timeout behavior, and the follow-up action are front-loaded and easy to parse.

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?

An output schema exists, so return shape need not be described. The description covers the key waiting behavior, timeout limits, and what to do after a timeout, though it could clarify the id parameter and get_batch distinction.

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 0%, so the description must carry parameter meaning. It documents timeoutMs default and maximum, but does not explain the required id parameter beyond implying it identifies the batch.

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. It clearly distinguishes waiting from reading batch items at timeout, though it does not explicitly contrast with the immediate-status sibling get_batch.

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 gives clear usage context by saying to wait again or read get_batch_items if the timeout is reached. It does not explicitly say when to use wait_batch rather than get_batch for immediate status checks.

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.