Skip to main content
Glama

cancel_batch

DestructiveIdempotent

Cancel every letter of a batch at once, only after explicit user approval and only before any is in preparation; each is fully refunded to the balance. Volume-priced batch letters can be cancelled only this way.

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>",
      "approved": "<approved>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "cancel_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
approvedYes
batch_idYes
idempotency_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is covered. The description goes beyond that by disclosing the state precondition (nothing in preparation), the user-approval gate, and the side effect that each cancelled letter is fully refunded to the balance — information not available in annotations or schema.

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?

One dense sentence that front-loads the core action before the preconditions and refund behavior. Efficient, though the semicolon-chained clauses make the approval, state, and refund conditions slightly harder to scan than separate sentences would.

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 destructive three-parameter mutation with no output schema, the description covers the key preconditions, side effects, and the mandatory-use case. The remaining gap is the idempotency_key parameter and error behavior, which are minor relative to what is already disclosed.

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 0%, so the description must carry the burden. It indirectly explains the approved flag (explicit user approval) and batch_id (the whole batch), but leaves idempotency_key entirely unaddressed, so compensation is only partial.

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 (cancel) and resource (every letter of a batch) with clear scope: the whole batch at once, not individual letters. The clause about volume-priced batch letters being cancellable only through this path further separates it from single-letter or single-order cancellation siblings such as cancel_order.

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?

Gives explicit preconditions: only after explicit user approval and only before any letter is in preparation. It also carves out a mandatory-use case (volume-priced batch letters) rather than leaving the agent to infer when this is the right tool versus alternatives.

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