Skip to main content
Glama

Wait for batch

wait_for_job
Read-only

Poll a batch (backoff 2s up to 10s) until every item is completed or failed, or until timeout. Pass expected_total (the total from create_photoshoot_batch) until the server reports its own. On timeout returns done=false with the latest status; call again to keep waiting.

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": {
      "batch_id": "<batch_id>"
    },
    "name": "wait_for_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
batch_idYes
expected_totalNo
timeout_secondsNoDefault 50.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds the parts that matter: backoff schedule (2s to 10s), overall timeout behavior, the done=false return on timeout, and the ability to re-invoke. That is real behavioral context an agent cannot get from structured fields.

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?

Three dense sentences, each doing distinct work: what it does, what to pass, what happens on timeout. Front-loaded with the operation and no filler.

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

Completeness5/5

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

There is no output schema, so the description carries the return semantics itself and does so: done=false plus latest status on timeout. For a three-parameter, read-only polling tool, nothing an agent needs in order to call it correctly is missing.

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 only 33%, so the description has to compensate, and it does for the least obvious param: expected_total is explained as the `total` from create_photoshoot_batch and as optional. batch_id gets no added meaning and timeout_seconds is only covered by the schema's 'Default 50', leaving a small gap.

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?

States a specific verb and resource: 'poll a batch ... until every item is completed or failed, or until timeout.' The batch scope implicitly separates it from the single-job sibling get_job, but it never names that sibling or explicitly contrasts the two.

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?

Tells the agent how to keep waiting after a timeout ('call again') and when to pass expected_total (until the server reports its own). It doesn't spell out when to prefer this over get_job, but the polling/blocking semantics give clear usage context.

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.

Resources