Skip to main content
Glama

cancel_batch

Cancel all unfinished jobs in a batch: queued jobs stop immediately and running jobs stop after their current step, while held credits are released and finished jobs keep their results.

Instructions

Cancel every unfinished job in a batch: queued jobs stop at once and running jobs stop after their current step. Credits held for cancelled jobs are released and cancelled jobs keep no results and cost nothing; finished jobs keep their results and charges. Safe to repeat. Returns the updated batch.

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 returned by create_batch or listed by list_batches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / batch_id / description
      Added value: +"Batch id returned by create_batch or listed by list_batches."
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly: it explains the different stop semantics for queued versus running jobs, credit release, that cancelled jobs retain no results and cost nothing, that finished jobs keep results and charges, and that the call is idempotent. It also notes the return value ('Returns the updated batch').

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?

Dense and front-loaded: the core action leads, followed by stop semantics, credit/result consequences, idempotency, and return value. Every clause contributes information and nothing is repeated.

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?

For a single-parameter, non-destructive-with-caveats batch operation with no output schema, the description covers timing, side effects, cost implications, idempotency, and return value. An agent could call it correctly and predict consequences without further information.

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 100% and batch_id already documents its format and where to obtain it (create_batch or list_batches). The description adds no further meaning about the parameter, so the schema does all the work here.

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?

States a specific verb and resource ('Cancel every unfinished job in a batch') and immediately scopes it to unfinished jobs only. The phrase 'in a batch' distinguishes it from the single-item cancel_extraction sibling without needing to name it.

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 by the scope statement (this is for batch-wide cancellation of unfinished work), and 'Safe to repeat' gives idempotency guidance. However, it never states when to prefer it over cancel_extraction for a single job, nor any preconditions or exclusions.

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