Skip to main content
Glama

Send a letter in one step

send_letter
Idempotent

Creates an order in one call from a PDF (pdf_base64 and filename) or a typed letter (letter), a destination or recipient_id, the sender's US return address, a spending cap and an idempotency key. Checks the address, prices the letter and creates the order. Returns the order status, the price, the standardized address, preview_url, and checkout_url or payment_url. Optional certified adds USPS Certified Mail. With a standing permission inside its limits, the letter goes to print at once. Above the spending cap nothing is ordered. The same key with the same request returns the same order.

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": {
      "sender": "<sender>",
      "max_amount_cents": "<max_amount_cents>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "send_letter"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNo
duplexNo
letterNo
senderYes
filenameNo
certifiedNo
mandate_idNo
pdf_base64No
destinationNo
recipient_idNo
mandate_tokenNo
payment_methodNo
idempotency_keyYes
max_amount_centsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / certified
      Added value: +{
      +  "enum": [
      +    "certified",
      +    "certified_return_receipt"
      +  ],
      +  "type": "string"
      +}
  2. Changed10 schema fields changed
    • removedInput schema / properties / letter / properties / to / $ref
      Removed value: -"#/properties/letter/properties/from"
    • addedInput schema / properties / letter / properties / to / additionalProperties
      Added value: +false
    • addedInput schema / properties / letter / properties / to / properties
      Added value: +{
      +  "address_city": {
      +    "maxLength": 80,
      +    "type": "string"
      +  },
      +  "address_line1": {
      +    "maxLength": 100,
      +    "type": "string"
      +  },
      +  "address_line2": {
      +    "maxLength": 100,
      +    "type": "string"
      +  },
      +  "address_state": {
      +    "maxLength": 20,
      +    "type": "string"
      +  },
      +  "address_zip": {
      +    "maxLength": 10,
      +    "type": "string"
      +  },
      +  "name": {
      +    "maxLength": 80,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / letter / properties / to / required
      Added value: +[
      +  "name"
      +]
    • addedInput schema / properties / letter / properties / to / type
      Added value: +"object"
    • removedInput schema / properties / sender / $ref
      Removed value: -"#/properties/destination"
    • addedInput schema / properties / sender / additionalProperties
      Added value: +false
    • addedInput schema / properties / sender / properties
      Added value: +{
      +  "address_city": {
      +    "maxLength": 80,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "address_country": {
      +    "const": "US",
      +    "default": "US",
      +    "type": "string"
      +  },
      +  "address_line1": {
      +    "maxLength": 64,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "address_line2": {
      +    "default": "",
      +    "maxLength": 64,
      +    "type": "string"
      +  },
      +  "address_state": {
      +    "type": "string"
      +  },
      +  "address_zip": {
      +    "pattern": "^\\d{5}(-\\d{4})?$",
      +    "type": "string"
      +  },
      +  "company": {
      +    "maxLength": 40,
      +    "type": "string"
      +  },
      +  "name": {
      +    "maxLength": 40,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / sender / required
      Added value: +[
      +  "name",
      +  "address_line1",
      +  "address_city",
      +  "address_state",
      +  "address_zip"
      +]
    • addedInput schema / properties / sender / type
      Added value: +"object"
  3. Changed6 schema fields changed
    • changedInput schema / properties / destination / properties / address_line1 / maxLength
      Previous value: -100New value: +64
    • changedInput schema / properties / destination / properties / address_line2 / maxLength
      Previous value: -100New value: +64
    • addedInput schema / properties / destination / properties / company
      Added value: +{
      +  "maxLength": 40,
      +  "type": "string"
      +}
    • changedInput schema / properties / destination / properties / name / maxLength
      Previous value: -80New value: +40
    • addedInput schema / properties / recipient_id
      Added value: +{
      +  "maxLength": 80,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "destination",
      -  "sender",
      -  "max_amount_cents",
      -  "idempotency_key"
      -]New value: +[
      +  "sender",
      +  "max_amount_cents",
      +  "idempotency_key"
      +]
  4. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true, openWorldHint=true), and the description adds real substance beyond them: address verification, pricing before ordering, the cap acting as a hard stop, auto-print under a standing permission, and the exact idempotency semantics ('same key with the same request returns the same order'). It also discloses return fields, which matters since there is no output schema.

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?

The purpose is front-loaded and every sentence carries information, but several are long multi-clause run-ons that pack inputs, side effects and return values into single sentences. Dense but nearly waste-free.

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 14-parameter, nested-object tool with no output schema, the description covers the essential flow, side effects, payment outcomes and return shape well. It leaves the print-format and payment_method/mandate parameters undocumented, which is a meaningful but not fatal gap.

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 coverage is 0%, so the description must compensate, and it does for the high-stakes parameters: it frames max_amount_cents as a spending cap that blocks ordering, explains idempotency_key semantics, and expresses the either/or relationship between destination and recipient_id that the schema cannot. Gaps remain for color, duplex, payment_method and the mandate_* pair, which are never mentioned.

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?

The description opens with a specific verb+resource ('Creates an order in one call') and immediately scopes the two input paths (PDF via pdf_base64/filename, or typed letter) plus the required destination/recipient_id, sender, cap and idempotency key. This distinguishes it from siblings like compose_letter or create_order without needing their schemas.

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 makes the usage context explicit: use this for one-step create-and-send, with certified as an add-on and standing permission enabling immediate printing. It also states the fallback condition (above the spending cap nothing is ordered). It stops short of naming when to prefer compose_letter or quote_document instead.

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