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.

Input Schema

NameRequiredDescriptionDefault
batch_idYesThe batch's id (UUID) from create_batch_mail or list_batch_mail.

Output Schema

NameRequiredDescriptionDefault
resultYesid, status cancelled, refunded_credits_cents, sandbox.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds genuinely new behavior: credits are refunded in full and the cancellation window is bounded by batch state. This is real value beyond the annotations, though it omits any auth or rate-limit context.

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?

Two tightly written sentences with zero filler; the eligible states are front-loaded before the exception, which is the order an agent needs to evaluate feasibility.

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?

Return values need not be explained since an output schema exists, and the state preconditions plus refund consequence cover the agent's decision inputs. Minor gap: no mention of what happens for already-cancelled or invalid batches.

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 coverage is 100% and the batch_id property already documents its UUID format and origin (create_batch_mail/list_batch_mail). The description adds no additional parameter meaning, so the baseline 3 applies.

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 (batch mail) directly. The state gating (draft/paid/generating/submitted vs in_progress) makes the scope unambiguous and distinguishes it from sibling cancel_outbound_mail at a conceptual level.

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

Usage Guidelines4/5

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

Explicitly lists the states in which cancellation is allowed and the one state (in_progress) where it is not, giving clear when-to-use and when-not-to guidance. It stops short of naming the alternative sibling tools, so it falls under a full 5.

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.