Skip to main content
Glama

Preview letter price

preview_letter_price

Calculates the exact price of a letter WITHOUT creating an order or charging anything. Always call this (or create_letter_order without confirming) before create_letter_order, and show the price to the user before sending money.

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": "preview_letter_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
pagesNoNumber of content pages, excluding the address page.
colourNo
contentNoPlain-text letter body, required unless contentUploadPath is supplied.
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • removedInput schema / properties / colour / description
      Removed value: -"Print in colour instead of black & white."
    • 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 / 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.1/5.0
Behavior4/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 disclose the critical trait: this call is free of side effects (no order, no charge). It stops short of stating quote validity/expiry, currency, or whether the returned price is guaranteed to match the eventual order, which are meaningful for a money-adjacent tool.

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?

Two sentences, front-loaded with the outcome and the prohibition, then the usage rule. Efficient, though the parenthetical "(or create_letter_order without confirming)" is slightly convoluted and costs a re-read.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 15-parameter, no-output-schema tool this is only partly sufficient: it never says what actually comes back (a numeric price, a breakdown, a currency code) and doesn't tie the previewed parameters to the ones create_letter_order will need. The safety framing is complete, but the return-shape gap is real with no output schema to fall back on.

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 schema describes only 27% of 15 parameters, and the description adds no parameter meaning at all. It never mentions that price depends on serviceClass, pages, colour, or doubleSided, nor the required address fields, so an agent gets no help on the bulk of undocumented inputs.

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?

Specific verb and resource ("Calculates the exact price of a letter") plus negation of the side effect ("WITHOUT creating an order or charging anything") cleanly separates it from create_letter_order. An agent can distinguish it from every listed sibling without opening a 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 directive on when to call it ("Always call this ... before create_letter_order") and a behavioral rule for the user interaction ("show the price to the user before sending money"). It also names the alternative path ("create_letter_order without confirming"), so the routing decision is fully specified.

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