Skip to main content
Glama

Cancel a batch

cancel_batch
Destructive

Skips the batch’s products that are not making images yet (free). Images already started finish, unless stop_images is true: then images no worker has started are cancelled and refunded. Example: {"batch_id": "…"}

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
stop_imagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the description is not the sole source of the safety profile, yet it adds substantial context beyond them: not-yet-started products are skipped for free, in-flight images will still complete unless stop_images is set, and unstarted images are refunded. It stops short of saying whether cancellation is reversible or what state the batch ends in.

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?

The consequence of calling the tool is front-loaded, and the two conditional paths are packed into compact clauses with no filler prose. The trailing example {"batch_id": "…"} adds almost nothing since the parameter is already required and typed in the schema.

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?

For a destructive two-parameter mutation with no output schema, the description covers the important behavioral split (what is skipped, what finishes, what is refunded). It leaves out the resulting batch status and any error or eligibility conditions, which an agent would need to confirm the call succeeded or was allowed.

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, and it does so for the genuinely ambiguous parameter: stop_images is explained in terms of exactly which images are cancelled, which ones are not, and that refunds follow. batch_id is only implied through the example and never described as the batch's UUID, 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?

The description states a specific effect on a specific resource (a batch's products and images) rather than restating the title, and the conditional clause makes clear this is a partial, two-stage cancellation rather than an outright abort. It does not explicitly name how it differs from the sibling cancel_image_set, so it is clear but not fully differentiated.

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?

The 'unless stop_images is true' clause effectively tells the agent when to set the flag, which is real usage guidance for the one non-obvious choice. However, it never states prerequisites (e.g. whether a batch must be running to be cancelled) or when to prefer this tool over cancel_image_set or retry_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.