Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as Piloxa. If you published it, claim ownership there.

Buy and send a prepared certified letter

authorize_certified_letter
DestructiveIdempotent

Buys and sends a letter that prepare_certified_letter prepared IN THIS CONVERSATION, after the person approved the exact total here. Call it only when (1) you have told the person the exact total, the recipient and the service, and they said yes to that total in this conversation, and (2) your platform has given you a Stripe shared payment token (spt_...) granted to Piloxa for that amount. Piloxa holds the payment, hands the letter to the printer, and charges only once the printer accepts it; if the printer refuses, the hold is released and nothing is charged. ALWAYS pass one idempotency_key per purchase and reuse it on every retry: the same key never charges twice and returns what already happened. If the total, the document or the address changed since the person approved, nothing is charged and you must ask again. Without a token, or if paying here is unavailable, nothing is charged and approval_url is returned: give it to the person, who pays there. The result carries transaction_state: AWAITING_APPROVAL, AUTHORIZED, VENDOR_ACCEPTED, MAILED, DELIVERED, RETURNED, FAILED or CANCELLED. Say a letter was sent only at VENDOR_ACCEPTED or later. At AUTHORIZED with failure OUTCOME_UNCERTAIN, do NOT retry: call get_certified_letter_status.

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": {
      "mailing_id": "<mailing_id>",
      "expected_total_cents": "<expected_total_cents>",
      "idempotency_key": "<idempotency_key>",
      "user_approved": "<user_approved>",
      "payer_email": "<payer_email>"
    },
    "name": "authorize_certified_letter"
  }
}

Input Schema

NameRequiredDescriptionDefault
quote_idNoOptional: the quote_id prepare_certified_letter returned. It binds the approval to that exact document, recipient, sender, service and total; if any of them changed or it expired, nothing is charged and you must ask again.
mailing_idYesThe mailing_id prepare_certified_letter returned in this conversation.
payer_emailYesWhere the receipt, the tracking and the mailing record go.
user_approvedYesTrue only when the person explicitly approved this exact total, recipient and service in this conversation.
document_sha256NoOptional: the document_sha256 prepare_certified_letter returned. If the document changed since, nothing is charged.
idempotency_keyYesOne key per purchase, 16 to 100 letters, digits or _ . : -. Reuse the same key on every retry of this purchase; a new key is a new purchase attempt.
approval_statementNoThe words the person was shown and said yes to, for the record, e.g. "Send this letter to Acme Property Management by USPS Certified Mail with return receipt for" followed by the exact total.
expected_total_centsYesThe exact total the person approved, in cents: the total_cents or estimated_total_cents Piloxa returned. If the current total differs, nothing is charged.
shared_payment_tokenNoA Stripe shared payment token (spt_...) your platform issued to Piloxa for this purchase, limited to the approved amount.

Output Schema

NameRequiredDescriptionDefault
mailedYes
chargedYes
failureNo
receiptNo
serviceNo
currencyNo
replayedNoTrue when this answers an earlier call with the same idempotency key, or a purchase already under way.
recipientNo
referenceNoThe Piloxa mailing reference, once the letter exists as a mailing.
mailing_idNo
final_quoteNoWhen the total differs from expected_total_cents: the standard total, discount, payable total, currency and first-letter status for this payer. Ask the person to approve payable_total_cents.
amount_centsNo
approval_urlNoWhere the person can review and pay instead.
practice_runNo
state_meaningNo
document_sha256No
amount_held_centsNo
printer_referenceNo
transaction_stateYes
amount_charged_centsNo
usps_tracking_numberNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / quote_id
      Added value: +{
      +  "description": "Optional: the quote_id prepare_certified_letter returned. It binds the approval to that exact document, recipient, sender, service and total; if any of them changed or it expired, nothing is charged and you must ask again.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / final_quote
      Added value: +{
      +  "description": "When the total differs from expected_total_cents: the standard total, discount, payable total, currency and first-letter status for this payer. Ask the person to approve payable_total_cents.",
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  2. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations (destructive, openWorld, idempotent) already cover the safety profile, but the description adds substantial context beyond them: when the charge actually occurs, that a printer refusal releases the hold, that a changed total/document/address charges nothing, and the approval_url fallback when no token exists. The only real gap is it doesn't spell out what the caller receives concretely, which the output schema covers anyway.

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 core action before the conditions, and nearly every sentence carries operational consequence (idempotency, charge timing, state vocabulary). It is a single dense block of ~200 words with no visual structuring, which makes it harder to scan than it needs to be, but nothing is 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?

For a destructive, money-moving, multi-parameter tool, the definition covers preconditions, payment mechanics, idempotency, failure handling, and status vocabulary, and defers return-value detail to the existing output schema. Nothing an agent needs before calling is missing.

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 100%, so 3 is the baseline, but the description adds genuine meaning: one idempotency_key per purchase reused on every retry, expected_total_cents must match what the person approved or nothing is charged, and shared_payment_token must be scoped to the approved amount. These are semantics the schema text alone does not fully convey.

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?

Uses a concrete verb and resource ("Buys and sends a letter") and immediately binds it to the output of a named sibling ("that prepare_certified_letter prepared IN THIS CONVERSATION"), so an agent can distinguish it from prepare/quote/status tools 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 two explicit, numbered preconditions (the person approved the exact total in this conversation; a Stripe spt_ token granted to Piloxa exists), plus an explicit routing instruction for the failure path ("call get_certified_letter_status" at AUTHORIZED with OUTCOME_UNCERTAIN, do NOT retry). Little is left 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