Skip to main content
Glama

MailmanAPI

Cancel a mailpiece

cancel_mail
Destructive

Cancel: Delete a draft, or cancel an approved piece before cancel_until. Pass id with the creating key, or the full private mail_url. Example: {"id":"mp_abcdefghijklmnopqrst"}

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cancel_mail"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNo
mail_urlNo

Output Schema

NameRequiredDescriptionDefault
idYes
toYes
fromYes
modeYes
pagesYes
proofYes
quoteYes
routeYes
stateYes
objectYes
statusYes
optionsYes
paymentYes
productYes
serviceYes
approvalYes
mail_urlYes
timelineYes
next_stepYes
share_urlYes
cancelableYes
created_atYes
record_urlYes
reprint_ofNo
updated_atYes
drafted_viaYes
preview_urlYes
receipt_urlYes
to_as_givenYes
total_centsYes
approval_urlYes
cancel_untilYes
approval_hashYes
address_statusYes
cancel_summaryYes
payment_noticeNo
document_sha256Yes
payment_refusedNo
replacement_urlNo
tracking_numberYes
possible_duplicateYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the safety profile is covered. The description adds a genuinely new behavioral constraint not present in structured fields: cancellation of an approved piece is only valid before cancel_until, and drafts are handled differently. It does not discuss irreversibility or what happens to the piece's status after cancellation.

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 short sentences plus one example, front-loaded with the action and its two modes, then the identification options. Given zero schema description coverage, the inline example earns its place rather than being filler.

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?

With an output schema present, return values need no explanation, and both of the two parameters are addressed in prose. What remains thin is failure behavior (what happens if cancel_until has passed or the id/key pairing is wrong), a minor gap for a destructive mutation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the burden and does so: it explains that id must come from the creating key and that mail_url must be the full private URL, plus a concrete example payload. The only gap is that it never explicitly says exactly one of the two identifiers is required (the schema marks neither as required).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Cancel: Delete a draft, or cancel an approved piece before cancel_until" states a specific verb and resource and distinguishes two distinct outcomes (draft deletion vs. approved-piece cancellation) with a temporal condition. It does not explicitly name a sibling tool as an alternative, so it stops short of 5.

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?

It tells the agent the applicable states (draft, or approved before the cancel_until deadline) and how to identify the target. It does not say what to do once the cancel_until window has passed, which leaves the main exclusion case to inference.

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