Skip to main content
Glama

PostalForm

Create a mail order draft

postalform.create_order_draft

Prepare an existing PDF for mailing and return the order ID, total, hosted checkout URL, and checkout session. After buyer approval, a compatible client can pass a Stripe shared payment token to complete_checkout; 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
pdfYesThe PDF to mail. Accepts attachment objects ({ download_url, file_id }). Fallbacks: upload_token from postalform.create_pdf_upload, data:application/pdf;base64,..., or a public HTTPS download URL.
colorNoWhether to print in color (default: false).
certifiedNoWhether to add proof mail: USPS Certified Mail for US destinations, Canada Post Registered Mail through PostGrid for Canadian destinations, or PinGen registered mail for supported European destinations (default: false).
file_nameNoOptional display file name.
buyer_nameNoReceipt name; defaults to sender_name for MPP.
mail_classNoMail service level (standard, priority, express).
request_idNoOptional idempotency key. Reuse the same value if retrying the call.
buyer_emailNoRequired for MPP receipt delivery.
sender_nameYesSender's name (return address).
double_sidedNoWhether to print double-sided (default: true).
recipient_nameYesRecipient's name.
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_idNoLoqate address id for the sender (required when sender_address_type is Address).
sender_address_textNoHuman-readable sender address preview (required when sender_address_type is Address; optional for Manual).
sender_address_typeYesAddress suggestion type for the sender (from postalform.search_addresses). Use Manual to pass a structured address with countryCode when outside the US.
recipient_address_idNoLoqate address id for the recipient (required when recipient_address_type is Address).
sender_address_manualNoSender manual address fields (required when sender_address_type is Manual).
recipient_address_textNoHuman-readable recipient address preview (required when recipient_address_type is Address; optional for Manual).
recipient_address_typeYesAddress suggestion type for the recipient (from postalform.search_addresses). Use Manual to pass a structured address with countryCode when outside the US.
certified_return_receiptNoAdd Electronic Return Receipt for US Certified Mail. Ignored for Canada Post Registered Mail and PinGen registered-mail destinations (default: false).
recipient_address_manualNoRecipient manual address fields (required when recipient_address_type is Manual).

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. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=false and openWorldHint=true, so the safety profile is partly covered. The description adds the critical behavioral fact that 'Draft creation never pays,' separating this from pay_order/complete_checkout, and describes the MPP challenge/preview response shape. It does not restate idempotency or rate-limit behavior, but request_id idempotency is already documented in the 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?

Front-loaded with the core verb and return values, then flows through hosted, MPP, and x402 paths in distinct sentences with no filler. Slightly dense — several paths are packed into a single paragraph — but every sentence carries routing information an agent needs.

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 21-parameter, nested-object, open-world mutation tool with an output schema, the description supplies everything structured fields cannot: the three payment paths, the post-approval handoff tools, and the explicit assurance that drafting never charges. Return-value detail is present without contradicting the output schema.

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 baseline is 3. The description earns above baseline by tying parameters to workflow semantics beyond the schema text: payment_protocol=mpp requires buyer_email and yields a different response (PDF preview, checkout_url fallback, MPP challenge), which the per-parameter schema descriptions only state in isolation.

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?

States a specific verb and resource ('Prepare an existing PDF for mailing') and immediately names what it returns (order ID, total, hosted checkout URL, checkout session). It also distinguishes itself from siblings by explicitly deferring x402 to postalform.create_machine_order and payment completion to complete_checkout/pay_order.

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 the agent explicit routing conditions: use complete_checkout with a Stripe shared payment token after buyer approval, otherwise present the hosted URL; for MPP set payment_protocol=mpp plus buyer_email and then call postalform.pay_order; for x402 use create_machine_order. When-to-use and when-to-use-something-else are both spelled out.

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