Skip to main content
Glama

Create a mail order draft from letter text

postalform.create_letter_order_draft

Prepare letter text for mailing and return the order ID, total, hosted checkout URL, and checkout session. Accepts text directly; no PDF upload or browser is needed. Letter drafts may include typed or drawn signatures. After buyer approval, a compatible client can use complete_checkout with a Stripe shared payment token; otherwise present the hosted checkout URL. To prepare for MPP, set payment_protocol=mpp and buyer_email; receive a PDF preview, hosted checkout_url fallback and MPP challenge, then use postalform.pay_order with the order_id after buyer approval. Draft creation never pays. For x402, use postalform.create_machine_order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
colorNo
letterYes
certifiedNo
buyer_nameNoReceipt name; defaults to sender_name for MPP.
mail_classNo
request_idNo
buyer_emailNoRequired for MPP receipt delivery.
sender_nameYes
double_sidedNo
recipient_nameYes
payment_protocolNoOptional payment path. Defaults to hosted checkout. Choose mpp to return a payment challenge for this same prepared order; buyer_email is required. Draft creation never pays.
sender_address_idNo
sender_address_textNo
sender_address_typeYes
recipient_address_idNo
sender_address_manualNo
recipient_address_textNo
recipient_address_typeYes
certified_return_receiptNo
recipient_address_manualNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
viewYes
paymentNo
order_idYes
price_usdYes
page_countYes
preview_urlNo
sender_nameYes
checkout_urlYes
recipient_nameYes
checkout_sessionNo
payment_protocolNo
sender_address_textYes
recipient_address_textYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / recipient_name / maxLength
      Previous value: -32New value: +255
    • changedInput schema / properties / sender_name / maxLength
      Previous value: -32New value: +255
    • addedOutput schema / properties / recipient_name / maxLength
      Added value: +255
    • addedOutput schema / properties / recipient_name / minLength
      Added value: +1
    • addedOutput schema / properties / sender_name / maxLength
      Added value: +255
    • addedOutput schema / properties / sender_name / minLength
      Added value: +1
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false, openWorldHint=true, destructiveHint=false, but the description adds material traits beyond them: 'Draft creation never pays' clarifies that this write tool does not charge, and it enumerates the returned artifacts (order ID, total, hosted checkout URL, checkout session, MPP challenge, PDF preview). It also discloses the signature and payment-flow behaviors the schema cannot express.

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?

Dense but front-loaded: the primary action and return artifacts come first, then the approval/payment-routing details, then the alternative-tool pointer. Every sentence is load-bearing, though the MPP/x402 sentences are packed tightly enough to verge on run-on.

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?

Given 20 params, nested objects, and an output schema, the description covers the operationally risky parts — that drafting is free, what comes back, and which follow-up tool applies per payment path. The remaining gap is the unexplained address and mailing options, but nothing that blocks a correct call is missing.

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 15% across 20 params, so the description must compensate, and it does partially: it explains the payment_protocol/hosted-vs-mpp choice and buyer_email requirement, and mentions typed/drawn signatures. But it is silent on the address_type enums, mail_class, certified, double_sided, color, sender/recipient address sourcing, and render options, leaving most parameters explained only by their names.

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 gives a precise verb+resource ('Prepare letter text for mailing' / 'Create a mail order draft from letter text') and explicitly distinguishes itself from siblings, stating it accepts text directly with 'no PDF upload or browser' (vs create_pdf_upload) and routing x402 users to create_machine_order. An agent can identify this tool without opening any 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?

It names alternatives and the conditions that select them: use complete_checkout after buyer approval for Stripe tokens, set payment_protocol=mpp for MPP, use postalform.pay_order with the resulting order_id, and use postalform.create_machine_order for x402. When-to-use is spelled out explicitly rather than implied.

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