Skip to main content
Glama

cancel_batch

Cancel a batch by batch_uuid when the user no longer wants it verified, for example a list submitted by mistake. Every address no worker has started is canceled and the tokens it reserved go back to the wallet at once; an address already being verified finishes and is billed as usual. The batch ends canceled and takes no more append_batch_emails chunks. Canceling a canceled batch changes nothing; a batch that already completed or failed cannot be canceled (cancel_batch.not_cancelable). Returns the batch as get_batch does, with tokens_billed and tokens_reserved after the refund. Requires the email:verify:bulk scope.

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_uuid": "<batch_uuid>"
    },
    "name": "cancel_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
batch_uuidYesPublic batch UUID returned by submit_batch or list_batches.

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?

With no annotations, the description carries the full burden and does so: unstarted addresses are canceled and their reserved tokens refunded immediately, in-flight addresses finish and are billed, the batch stops accepting append_batch_emails chunks, and repeat cancellation is idempotent. It also discloses the auth requirement (email:verify:bulk scope) and the specific error code cancel_batch.not_cancelable.

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?

Front-loaded with the action and its trigger, then layered with effects, edge cases, return shape, and scope in that order. Every sentence contributes distinct operational information with no filler.

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?

Despite having no output schema, the description explains the return value ('the batch as get_batch does, with tokens_billed and tokens_reserved after the refund'). Combined with partial-billing semantics, idempotency, error code, and scope, an agent has everything needed to call it correctly.

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 single batch_uuid parameter is already documented in the schema as coming from submit_batch or list_batches. The description adds no syntax, format, or sourcing detail beyond that, so the baseline of 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 and resource ('Cancel a batch by batch_uuid') plus the triggering condition ('when the user no longer wants it verified'). Clearly distinct from siblings like get_batch (read), submit_batch (create), and append_batch_emails (which it explicitly terminates).

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?

Gives concrete when-to-use context ('a list submitted by mistake') and spells out the boundary cases where it is a no-op or fails (already canceled, completed, failed). It does not name an alternative tool to reach for in those non-cancelable cases, so routing for edge cases is left implicit.

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