Skip to main content
Glama

Delete letter

delete_letter
DestructiveIdempotent

Deletes a draft, or cancels a paid letter sent for the user that has not been posted yet: the stamp goes back to Deutsche Post and the full amount is refunded the way the user paid. Only letters of this account; others return "Letter not found". Use it when the user no longer wants the letter; to change a draft use update_letter. Cannot be undone; order records without personal data are kept by law. Posted letters and purchased self_print letters are only erased, not refunded.

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": {
      "letter_id": "<letter_id>"
    },
    "name": "delete_letter"
  }
}

Input Schema

NameRequiredDescriptionDefault
letter_idYesThe letter_id returned by create_letter or list_letters, e.g. 'a21517e4dac913a8'.

Output Schema

NameRequiredDescriptionDefault
amountNoRefunded amount.
refundNorefunded_to_payment_method, returned_to_balance, refund_pending or test_no_money.
deletedNotrue when content and addresses were erased.
remainsNoWhat is kept by law.
cancelledNotrue when a paid letter was cancelled before dispatch.
letter_idNoId of the letter.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / letter_id / description
      Previous value: -"The letter id returned by create_letter."New value: +"The letter_id returned by create_letter or list_letters, e.g. 'a21517e4dac913a8'."
    • addedOutput schema / properties
      Added value: +{
      +  "amount": {
      +    "description": "Refunded amount.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "cancelled": {
      +    "description": "true when a paid letter was cancelled before dispatch.",
      +    "type": [
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "deleted": {
      +    "description": "true when content and addresses were erased.",
      +    "type": [
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "letter_id": {
      +    "description": "Id of the letter.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "refund": {
      +    "description": "refunded_to_payment_method, returned_to_balance, refund_pending or test_no_money.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "remains": {
      +    "description": "What is kept by law.",
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  }
      +}
    • removedOutput schema / title
      Removed value: -"delete_letterDictOutput"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, and the description still adds substantial context beyond them: refund path back to the original payment method, stamp return to Deutsche Post, irreversibility, legal retention of order records, and the differing treatment of posted/self_print letters. The only gap is that durability of the deletion and repeat-call behavior are not restated, though idempotentHint covers that.

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 action and its two modes, then progressively adds preconditions, the alternative tool, and edge cases. Dense colon-and-semicolon phrasing packs a lot in, but each clause carries distinct information and nothing reads as 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?

An output schema exists, so return values need not be explained, and the description covers everything else an agent needs: ownership scoping and the resulting 'Letter not found' error, refund semantics, irreversibility, legal retention, and the partial-outcome cases. Complete for a destructive single-parameter tool.

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?

There is a single required parameter with 100% schema coverage, including its own description and an example format, so the schema already carries the semantics. The prose adds nothing about letter_id itself, which is acceptable but not value-adding — 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?

Opens with a precise verb and resource ('Deletes a draft, or cancels a paid letter...not yet been posted') and immediately distinguishes the two modes of deletion plus the refund consequence. An agent can tell exactly what object is affected and under which states, and the mention of update_letter separates it from the sibling that modifies drafts.

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?

States the selecting condition explicitly ('Use it when the user no longer wants the letter') and names the alternative for the adjacent intent ('to change a draft use update_letter'). It also brackets the out-of-scope cases (posted letters, purchased self_print letters) with their differing outcome, so the agent knows when not to expect a refund.

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