Skip to main content
Glama

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. Changed2 schema fields changed
    • changedInput schema / properties / recipient_name / maxLength
      Previous value: -256New value: +255
    • changedInput schema / properties / sender_name / maxLength
      Previous value: -256New value: +255
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only give the generic readOnly=false/destructive=false/openWorld=true profile; the description goes well beyond by disclosing the MPP/x402 payment handshake, the idempotent retry expectation after a challenge, the checkout_url/status_url fallback, and the warning not to recreate the order. That is exactly the operational context an agent needs for a payment-mutating call.

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 core purpose is front-loaded in the first clause and every sentence carries routing or constraint information. It is dense and runs long as a single block, but there is little genuine padding.

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 29-parameter, nested, open-world payment tool with an output schema, the description covers the critical decision logic (payment path selection, bulk exclusivity, fallback flow). Remaining gaps are field-level details that the schema already documents, so it is nearly complete but not exhaustive.

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 carries a real burden. It clarifies the bulk branch (exactly one of csv_content/recipients, content_mode semantics, template pairing) and the payment params, but leaves many top-level fields (mail_class, certified, postcard_size, sender/recipient address options, letter render/signature) to the schema, so it only partially compensates.

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 names a specific verb pair (create/pay) and enumerates the exact resources: single PDF, letter, workflow-form order, or bulk letter campaign. It distinguishes itself from siblings by routing to draft tools + complete_checkout and to postalform.pay_order, so an agent can place it 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?

It states explicit when/when-not branches: bulk MPP orders may use postalform.pay_order after fetching the challenge; SPT-capable single-recipient clients should use a draft tool then complete_checkout; walletless clients must present checkout_url and poll status_url. It even forbids an anti-pattern ('never recreate the order to change payment paths').

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