Skip to main content
Glama

cancel_batch_mail

DestructiveIdempotent

Cancel a batch before the facility starts (draft, paid, generating or submitted); credits are refunded in full. Once the facility is printing (in_progress) it cannot be cancelled.

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_mail"
  }
}

Input Schema

NameRequiredDescriptionDefault
batch_idYesThe batch's id (UUID).

Output Schema

NameRequiredDescriptionDefault
resultYesid, status cancelled, refunded_credits_cents, sandbox.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / batch_id / description
      Previous value: -"The batch's id (UUID) from create_batch_mail or list_batch_mail."New value: +"The batch's id (UUID)."
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already flag destructive, idempotent, and open-world behavior, and the description adds genuinely new information: credits are refunded in full, and cancellation is impossible once the facility begins printing. That refund and hard-failure boundary is exactly the behavioral context 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.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the eligible states front-loaded and the failure condition second — no wasted clauses. Structure is functional, but the state list plus the in_progress restatement slightly duplicates the same gating idea twice.

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 single-parameter destructive tool with an output schema, the description covers the essential preconditions and the refund side effect. It stops short of saying what the caller receives or what happens on an attempted in_progress cancel, but the output schema removes the need for return-value detail.

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?

Only one parameter, batch_id, and the schema already documents it at full coverage as a UUID. The description adds no additional meaning about the identifier (e.g., where to obtain it), so this sits at the baseline where the schema does all the work.

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 a batch) and immediately narrows scope to the eligible state set (draft, paid, generating, submitted). The parenthetical state list makes the tool's target unambiguous even though many batch-related siblings exist.

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?

Explicitly states both when to use it (any batch not yet at the facility) and when it will fail (in_progress/printing), which is the key decision boundary an agent needs. It does not name the sibling cancel_outbound_mail, but the state-based exclusion guidance is stronger and more actionable than a mere pointer.

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.