Skip to main content
Glama

Retry a batch’s failed pictures

retry_batch

Queue the batch’s failed pictures (and any stopped for want of credits) again as new runs, or only the item_ids given. Charged as each starts, like a new batch of that many pictures: the balance must cover them and they count against a monthly limit.

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": "retry_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
batch_idYesThe batch id start_batch returned.
item_idsNo

Output Schema

NameRequiredDescriptionDefault
itemsYes
modelYes
sceneYes
countsYes
statusYes
batch_idYes
requeuedYesPictures queued again.
created_atYes
item_countYes
settled_atYes
quoted_creditsYesWhat the batch costs if every picture runs.
charged_creditsYesWhat its runs were charged so far.
per_item_creditsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed6 schema fields changed
    • removedOutput schema / properties / items / items / properties / error_code / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / error_code / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / job_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / items / items / properties / job_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / settled_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / settled_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  3. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations, the description discloses the key cost/authorization behavior: each retried picture is charged as it starts, the balance must cover the full count, and the retry counts against a monthly limit. It also implies non-idempotency by creating 'new runs.' Remaining gaps: no mention of what happens on partial credit exhaustion or whether original failed records are retained.

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

Conciseness4/5

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

Two dense sentences with the core behavior front-loaded and the billing caveat second. Every clause carries information, though the parenthetical about credits could be tightened.

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 no explanation, and the description covers the essential behavior plus the surprising billing side effect for this mutation. Minor gap is the absence of guidance on failure modes or permission prerequisites.

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?

batch_id is already documented in the schema; the description compensates for the undocumented item_ids by explaining that it restricts the retry to specific item IDs. It does not mention the 100-item cap, that the IDs are picture IDs from the batch, or what happens to IDs that never failed.

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 names a specific action and resource: re-queue a batch's failed (or credit-stopped) pictures as new runs, with an optional item_ids subset. It clearly differs from start_batch by scoping to an existing batch's failures, though it never names start_batch or any sibling explicitly.

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?

Usage is implied rather than stated: you call it after a batch has failures, and pass item_ids to narrow the retry. There is no explicit when-not guidance, no statement about what happens if nothing failed, and no named alternative for starting a fresh batch.

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