Skip to main content
Glama

Create and pay for a letter order

create_letter_order

Creates a letter order and immediately debits the customer's balance to pay for it - this spends real money and cannot be undone. Call it WITHOUT confirmed:true first: it will only return the price, without charging or creating anything. Only after the price has been shown to the human and they've agreed to it, call it again with confirmed: true and expectedTotalPence set to the exact totalPence you were quoted. If the recomputed price no longer matches expectedTotalPence, the order is rejected so you cannot accidentally confirm a stale price.

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": {
      "serviceClass": "<serviceClass>",
      "recipientName": "<recipientName>",
      "recipientLine1": "<recipientLine1>",
      "recipientCity": "<recipientCity>",
      "recipientPostcode": "<recipientPostcode>"
    },
    "name": "create_letter_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
pagesNoNumber of content pages, excluding the address page.
colourNo
contentNoPlain-text letter body, required unless contentUploadPath is supplied.
confirmedNoOnly true after the customer explicitly agrees to the price.
senderNameNo
doubleSidedNo
senderLine1No
serviceClassYes
recipientCityYes
recipientNameYes
recipientLine1Yes
recipientLine2No
senderPostcodeNo
recipientCountryNoISO 3166-1 alpha-2 country code, e.g. GB, US, FR.GB
contentUploadPathNoVerified path from POST /api/v1/uploads/request-url. Files cannot be uploaded through agent messages.
recipientPostcodeYes
expectedTotalPenceNoExact quoted total in pence, required to place an order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • removedInput schema / properties / colour / description
      Removed value: -"Print in colour instead of black & white."
    • changedInput schema / properties / confirmed / description
      Previous value: -"Set to true only after the customer has explicitly agreed to the previewed price."New value: +"Only true after the customer explicitly agrees to the price."
    • changedInput schema / properties / content / description
      Previous value: -"Plain-text letter body. Required unless contentUploadPath is supplied."New value: +"Plain-text letter body, required unless contentUploadPath is supplied."
    • changedInput schema / properties / contentUploadPath / description
      Previous value: -"Path returned by the customer's own upload flow (POST /api/v1/uploads/request-url) for a pre-uploaded PDF/DOCX. The MCP server cannot upload files itself."New value: +"Verified path from POST /api/v1/uploads/request-url. Files cannot be uploaded through agent messages."
    • removedInput schema / properties / doubleSided / description
      Removed value: -"Print double-sided (duplex)."
    • changedInput schema / properties / expectedTotalPence / description
      Previous value: -"The totalPence you were quoted when confirmed is true. Required to actually place the order."New value: +"Exact quoted total in pence, required to place an order."
    • changedInput schema / properties / pages / description
      Previous value: -"Number of content pages (excludes the address page)."New value: +"Number of content pages, excluding the address page."
    • removedInput schema / properties / serviceClass / description
      Removed value: -"Royal Mail service to send with. Domestic: SECOND_CLASS, FIRST_CLASS, SECOND_CLASS_SIGNED, SIGNED_FOR, SPECIAL_DELIVERY, TRACKED_48, TRACKED_24. International: INTERNATIONAL_STANDARD, INTERNATIONAL_TRACKED, INTERNATIONAL_TRACKED_SIGNED."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does it: it discloses that real money is spent, that the action is irreversible, that the unconfirmed path has no side effects, and that a stale price causes rejection. These are exactly the behavioral traits an agent needs before a destructive payment call.

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?

Four sentences, front-loaded with the money/irreversibility warning, then the two-phase flow, then the stale-price safeguard. No filler and no repetition of schema-visible defaults.

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?

For a 17-parameter, irreversible payment tool with no annotations and no output schema, the description covers the risky mechanics thoroughly. Gaps remain on what the quote response contains and on the content/contentUploadPath choice, which the agent must rediscover from the schema.

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 description coverage is only 35%, but the description fully explains the two highest-risk parameters (confirmed and expectedTotalPence) including the exact-quote coupling. The other fifteen parameters — colour, doubleSided, sender fields, serviceClass, the content vs contentUploadPath alternative — get no treatment beyond the schema, so it partially compensates rather than fully.

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?

Names a specific verb and resource ('Creates a letter order') and immediately adds the material consequence ('debits the customer's balance to pay for it'), which separates it from siblings like preview_letter_price and get_order. An agent can tell what this tool does and what it costs without opening the schema.

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?

Gives an explicit two-call protocol: first call without confirmed (quote only), then a second call with confirmed:true and expectedTotalPence after the human agrees. It states both when to call and when not to confirm, leaving nothing 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