Skip to main content
Glama

Cancel batch

cancel_batch
Destructive

Cancel all queued and running jobs of a batch; finished jobs keep their results. Returns the batch summary. To stop a single job, cancel just that job.

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_idYesBatch ID (bat_…) returned by run_batch.

Output Schema

NameRequiredDescriptionDefault
idNoBatch ID.
countsNoNumber of jobs by state.
statusNoBatch state after the call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the destructive annotation, the description discloses the precise blast radius: queued and running jobs are canceled, finished jobs retain their results, and the batch summary is returned. These are exactly the behavioral details an agent needs before invoking a destructive operation.

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?

The description is three tight sentences: effect, return value, and alternative. It is front-loaded and every sentence carries useful information.

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?

With an output schema, full annotation coverage, and a single fully documented parameter, the description supplies everything needed: scope, preservation of finished results, return value, and routing to the single-job alternative.

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?

The only parameter, batch_id, has 100% schema description coverage and is already explained as the ID returned by run_batch. The description adds no further parameter-level semantics, which is acceptable at the baseline for full schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: cancel a batch's queued and running jobs. It also draws a clear boundary against the sibling action of canceling a single job, so an agent can distinguish cancel_batch from cancel_job.

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

Usage Guidelines5/5

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

It explicitly says to use this tool for all queued and running jobs in a batch, and directs the agent to cancel just that job when stopping a single job. That is a clear when-to-use and when-to-use-alternative rule.

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