Skip to main content
Glama

Wait for a batch

wait_batch
Read-onlyIdempotent

Wait for an Octocrawl batch to finish, returning its status by the timeout; if unfinished, it returns current progress so you can wait again or read batch items.

Instructions

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. First observedv0.7.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so safety is covered. The description adds the traits that matter here: bounded blocking behavior, the default timeout (30000), the hard cap (120000), and the fact that a timeout returns partial status rather than failing. It does not say whether the call holds a connection open or whether repeated waits are rate-limited, which is minor.

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 with the blocking behavior, timeout bounds, and fallback action front-loaded in that order. No filler, and every clause carries unique information.

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, return values need not be explained, and annotations cover the safety profile, so the description is nearly complete for a two-parameter polling tool. The only missing piece is a pointer to get_batch for a non-blocking status check versus this blocking wait.

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 description coverage is 0%, so the description must carry the load. It fully documents the non-trivial parameter timeoutMs (default 30000, maximum 120000) and implies the required 'id' is the batch identifier via 'a batch to finish'. That adds the default value and blocking semantics the schema lacks, though 'id' itself is never explicitly described.

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

Purpose5/5

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

States a specific verb ('wait') plus resource ('batch') and the exact semantics: block until finished or timeout, then return current status. It also names the sibling get_batch_items as the place to go for items, so an agent can distinguish it from get_batch without opening either schema.

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 operational guidance: if the timeout elapses, either call wait again (polling pattern) or read get_batch_items. That covers the follow-up action explicitly, but it never contrasts itself with the non-blocking get_batch sibling, so the choice of when not to use a blocking wait is left implicit.

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