Skip to main content
Glama

Cancel a batch

cancel_batch
DestructiveIdempotent

Stop a batch. A URL already being read finishes and is charged, because it is a page we are already paying for. Every URL not yet started becomes skipped, which costs nothing and is not a verdict about the URL: submit those positions again whenever you like. Safe to repeat; a batch that has already ended answers with how it ended.

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": {
      "id": "<id>"
    },
    "name": "cancel_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe batch's id, as create returned it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is partly covered. The description still adds real substance beyond them: the in-flight URL is completed and billed, unstarted URLs become `skipped` at no cost and carry no quality judgment, and re-calling an ended batch reports its terminal state. Only 'safe to repeat' restates idempotentHint.

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 action is front-loaded in a three-word sentence, followed by consequences in a logical order: billing, skip semantics, re-submission, repeat safety. Dense but nearly every clause carries distinct information; the re-submission reassurance is slightly expansive but justified for a destructive operation.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter destructive call with no output schema, the description covers the important unknowns: cost implications, resulting statuses, resubmission guidance, and what an already-ended batch returns. Only explicit guidance on when cancellation is the right choice is missing.

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?

There is a single parameter with 100% schema description coverage ('The batch's id, as create returned it'), so the schema already carries the semantics. The description adds nothing about the id, which is acceptable at this coverage level but leaves no extra value.

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 opening 'Stop a batch' gives a specific verb and resource, and the rest of the description clarifies the exact scope of stopping (in-flight work continues, queued work is skipped). It is unmistakable against siblings like create_batch, get_batch, and quote_batch.

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 rather than stated: the description explains what cancellation does and that skipped positions can be resubmitted, which tells an agent the intent behind the call. It never explicitly says when to cancel versus alternatives such as letting a batch finish or closing a session, and offers no prerequisites.

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