Skip to main content
Glama

PostalForm

Create or pay a machine order

postalform.create_machine_order

Create a single PDF, letter, workflow-form order, or bulk letter campaign and pay through MPP or x402 after buyer approval. For bulk, provide exactly one of bulk.csv_content or bulk.recipients (JSON address objects with optional merge_fields), plus a shared PDF or text/HTML template. Omit top-level recipient fields and review campaign_url, recipient count and total. Bulk MPP orders can also use postalform.pay_order after fetching its challenge. The unpaid response also includes checkout_url and status_url for this same order. Without an available compatible wallet, give the buyer checkout_url and poll status_url; never recreate the order to change payment paths. Single-recipient clients with a Stripe shared payment token can instead use a draft tool followed by complete_checkout; other clients should present the hosted checkout URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pdfNoExisting PDF to mail. For a single recipient, provide exactly one of pdf, letter, or form. For bulk.content_mode=pdf, this PDF is sent to every CSV or JSON recipient. Prefer upload_token from postalform.create_pdf_upload.
bulkNoBulk letter campaign: exactly one of csv_content or recipients (JSON list), plus shared PDF or text/HTML template. Omit single-recipient fields, letter, form, and postcard options. color and double_sided apply to every mailpiece.
formNoWorkflow form payload from postalform.get_form_schema. Provide exactly one of pdf, letter, or form.
colorNo
letterNoLetter text to render and mail. Provide exactly one of pdf, letter, or form. Optional format may be text, html, markdown, or rtf; default is text. Optional signature may be a typed string or drawn signature payload.
certifiedNo
file_nameNo
buyer_nameYesBuyer name for receipts.
mail_classNo
request_idNoIdempotency key. Reuse the same value and same order fields after a payment challenge.
buyer_emailYesBuyer email for receipts.
sender_nameYes
double_sidedNo
postcard_sizeNo
mailpiece_typeNo
recipient_nameNoRequired for a single recipient. Omit when bulk supplies the recipient list.
payment_protocolNoDirect machine payment protocol. Use mpp for Link CLI/Link MCP or Stripe SPT; use x402 for x402 wallet clients. Defaults to mpp.
payment_signatureNox402 retry value after paying the PAYMENT-REQUIRED challenge.
sender_address_idNo
signature_requiredNo
sender_address_textNo
sender_address_typeNo
recipient_address_idNo
payment_authorizationNoMPP retry value after paying with Link CLI/Link MCP. Pass the full Authorization header value, usually "Payment ...".
sender_address_manualNo
recipient_address_textNo
recipient_address_typeNo
certified_return_receiptNo
recipient_address_manualNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bulkNo
viewYes
statusYes
is_paidYes
paymentNo
currencyYes
endpointYes
order_idYes
protocolYes
next_stepNo
price_usdYes
page_countNo
request_idYes
status_urlNo
next_actionNo
preview_urlNo
campaign_urlNo
checkout_urlNo
postcard_sizeYes
mailpiece_typeYes
payment_statusYes
payment_optionsNo
order_complete_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare openWorldHint=true, readOnlyHint=false, and destructiveHint=false, so the safety profile is partly covered. The description adds non-obvious behavior: payment challenge/retry flow, that the unpaid response carries checkout_url and status_url, buyer-approval gating, and the anti-pattern of recreating orders for payment paths. It stops short of discussing idempotency explicitly (only implied via request_id in the schema) or rate limits.

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 definition is dense and front-loaded, leading with creation scope before enumerating payment and bulk rules. It is longer than ideal and mixes bulk-mode constraints with payment-protocol guidance, but each sentence carries operational content rather than filler.

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?

An output schema exists, so return-shape explanation is unnecessary, and the description covers the two dominant flows (single-recipient and bulk) plus payment fallbacks. Given 29 parameters and nested objects, it leaves a fair amount of per-field semantics to the schema, but the critical routing and bulk rules are present.

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 coverage is only 38% across 29 parameters, so the description must compensate. It usefully explains the bulk exclusivity rule (exactly one of bulk.csv_content or bulk.recipients plus a shared PDF or template) and the 'omit top-level recipient fields' rule, but the many single-recipient options (color, double_sided, mail_class, certified, postcard_size, render/signature details) receive no description-level clarification.

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 and resource set: 'Create a single PDF, letter, workflow-form order, or bulk letter campaign and pay through MPP or x402.' It also names the sibling alternatives it is not (pay_order for bulk MPP, draft + complete_checkout for Stripe SPT), so an agent can distinguish it from the surrounding order tools without opening schemas.

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 gives explicit routing: use this for machine orders, use postalform.pay_order for bulk MPP retries, use a draft tool plus complete_checkout for Stripe SPT single-recipient clients, and otherwise present the hosted checkout URL. It also states the when-not condition ('never recreate the order to change payment paths') and the no-wallet fallback.

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