Skip to main content
Glama

cancel_batch

Destructive

Cancels a running batch image generation using its batch ID, enabling you to stop work that is no longer needed.

Instructions

Cancel a running batch generation.

Args: batch_id: The batch ID returned by batch_generate.

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

Input Schema

NameRequiredDescriptionDefault
batch_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is known. Beyond that, the description adds nothing: it does not say whether cancellation is reversible, whether already-generated partial results are retained or discarded, or what happens on an invalid or completed batch ID.

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?

One-sentence summary followed by an Args block is well front-loaded with zero filler. The docstring-style formatting is slightly verbose for a single parameter but does not obscure the core statement.

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

Completeness3/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 values need not be explained. However, for a destructive one-shot mutation the description should disclose consequences such as irreversibility and the fate of partial output; that omission leaves it only minimally adequate.

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 carries the burden for the single parameter. It does add real provenance by tying batch_id to the value returned by batch_generate, but gives no format, example, or validity detail beyond that.

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 ('Cancel a running batch generation'), which is clearly distinct from batch_generate and check_batch_progress. It does not explicitly name an alternative, but the direction of the operation 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 Guidelines3/5

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

Usage is only implied: the word 'running' hints that only in-progress batches qualify, and the reference to batch_generate implies you need a batch ID from a prior generation. There is no explicit when-to-use or when-not-to-use statement, and no mention of what to do if the batch already finished.

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