Skip to main content
Glama

Cancel a batch

cancel_batch
DestructiveIdempotent

Cancel a running batch by its task ID while preserving already read items. Stops further processing but keeps existing results accessible.

Instructions

Cancel a batch by its taskId; the items already read stay readable.

Input Schema

NameRequiredDescriptionDefault
idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered. The description does add one genuinely non-obvious fact beyond them: items already read remain readable after cancellation, implying partial results survive. It says nothing about in-flight items, error/partial-failure behavior, or permissions, so a 3 is warranted.

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?

A single front-loaded sentence with two clauses, both of which carry information (the handle and the post-cancel state). No filler or preamble, though it is terse enough to leave the reader wanting more on usage.

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 one-parameter mutation tool with annotations covering safety and no output schema, the essentials are present, and the note about surviving items is helpful. It still leaves open what happens if the batch already finished and whether cancellation is immediate, which idempotentHint only partially covers.

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 coverage is 0% and the single parameter is named "id" with no schema description, so the description carries the burden. It does clarify that the id is the batch's taskId, which adds real meaning, but gives no format, source, or example of where to obtain it.

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 batch") and identifies the required handle as a taskId, so the agent knows exactly what operation this is. It does not explicitly differentiate itself from sibling cancellers like cancel_crawl or cancel_monitor_run, but the resource noun makes the target unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

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

No guidance on when to cancel versus alternatives such as wait_batch, get_batch, or hand_off_batch is given. The agent must infer that this is the abort path for an in-progress batch, and no preconditions or exclusions are stated.

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