Skip to main content
Glama

Print and Mail Company

Cancel letter

cancel_letter
DestructiveIdempotent

Use this when the user wants to stop a letter they created here: cancels a draft, or a paid letter that has not gone into production yet, and returns the amount to the user's credit. Letters already printed or posted cannot be recalled. This cancels our letter, not a contract the user has with someone else (for that, compose_letter writes the cancellation letter). Ask the user before cancelling. Needs the user's account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
letter_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true, and the description adds genuinely new behavior: the credited refund, the irreversibility boundary for printed/posted letters, the account requirement, and the confirmation-before-action rule. These are consequences an agent needs that the annotations alone do not convey.

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?

Front-loaded with the usage condition and broken into short clauses, with no filler sentences. It is slightly long, but each clause carries a distinct constraint (refund, recall limit, sibling disambiguation, confirmation).

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 strong annotations and no output schema, the description covers eligibility, effect (credit refund), and the confirmation requirement, which is close to complete for a single-parameter mutation. What is missing is the shape of the result/error when a letter is already in production.

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

Parameters2/5

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

The sole parameter letter_id has 0% schema description coverage, so the description must carry the burden and largely does not — it never states the ID's format or provenance (e.g., from list_letters or create_letter). It only implicitly narrows which letters are eligible (drafts or pre-production paid letters on the user's account).

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 letter created here) and immediately scopes it to drafts or paid letters not yet in production. It also disambiguates from the nearest confusing sibling by noting this does not cancel a user's contract with a third party, which is compose_letter's job.

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 gives the trigger (user wants to stop a letter created here), the exclusions (already printed or posted cannot be recalled), and the alternative route for contract cancellations via compose_letter. It even prescribes the interaction step: ask the user before cancelling.

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.