Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOB_API_KEYYesYour Lob API key. Use a `test_…` key during development; mail-piece tools will not produce real mail in test mode. Switch to `live_…` only when ready to ship real mail.
LOB_BASE_URLNoOverride the Lob API base URL. Defaults to 'https://api.lob.com/v1'.
LOB_API_VERSIONNoPin a specific Lob API version via the `Lob-Version` header (e.g., '2020-02-11'). Omit to use your account default.

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
lob_addresses_createA

Save an address to the Lob address book so it can be reused by ID (adr_…) when creating mail pieces. Stored addresses are NOT automatically verified — call lob_us_verifications_create or lob_intl_verifications_create separately if needed.

lob_addresses_listA

List addresses stored in your Lob address book. For 'how many addresses?' counts, pass include: ['total_count'] with limit: 1. Filter by date_created (e.g. { gt: '<iso>' } for recently-added) or metadata.

lob_addresses_getA

Retrieve a single saved address by ID.

lob_addresses_deleteA

Delete a saved address from the address book. Does not affect mail pieces already created with it.

lob_us_verifications_createA

Verify, correct, and standardize a single US address. Returns deliverability status, USPS-formatted components, geolocation (lat/lng), and county info.

lob_us_verifications_getA

Retrieve a previously-created US verification by ID.

lob_us_autocompletions_createA

Suggest completed US addresses from a partial input — useful for typeahead UX. Returns up to 10 suggestions.

lob_intl_verifications_createA

Verify a single non-US address. Returns deliverability status and standardized components for the destination country.

lob_bulk_us_verifications_createA

Verify up to 1,000 US addresses in a single request. Returns one verification result per input, in the same order.

lob_bulk_intl_verifications_createA

Verify up to 1,000 non-US addresses in a single request.

lob_identity_validationA

Validate a person/business name against a US address. Returns whether the recipient is associated with the address.

lob_postcards_previewA

Render a Lob proof PDF for a postcard without charging or sending. Returns a confirmation_token to pass to lob_postcards_create. The token is required in live mode (LOB_LIVE_MODE=true). Token TTL: LOB_CONFIRMATION_TTL_SECONDS (default 600). Sizes: 4x6 (default), 6x9, 6x11.

lob_postcards_createA

Commit a postcard send. Billable in live mode: produces real physical mail and is charged to your Lob account. In live mode, requires a confirmation_token from lob_postcards_preview that matches the current payload. In test mode, the token is optional (dev ergonomics).

lob_postcards_listA

List postcards on your Lob account. For 'how many postcards?' counts, pass include: ['total_count'] with limit: 1 — never paginate to count. Filter by date_created (e.g. { gt: '<iso>' } for 'last N days'), send_date, size, mail_type, scheduled, or metadata. Default sort is most-recent first.

lob_postcards_getA

Retrieve a single postcard by ID.

lob_postcards_cancelA

Cancel a postcard before its send_date. Only works while the postcard is still in a cancellable state — production-locked pieces cannot be cancelled.

lob_letters_previewA

Render a Lob proof PDF for a letter without charging or sending. Returns a confirmation_token to pass to lob_letters_create. Required in live mode.

lob_letters_createA

Commit a letter send. Billable in live mode. Requires a confirmation_token from lob_letters_preview that matches the current payload (live mode only).

lob_letters_listA

List letters on your Lob account. For 'how many letters?' counts, pass include: ['total_count'] with limit: 1 — never paginate to count. Filter by date_created (e.g. { gt: '<iso>' } for 'last N days'), send_date, mail_type, color, scheduled, or metadata. Default sort is most-recent first.

lob_letters_getA

Retrieve a single letter by ID.

lob_letters_cancelA

Cancel a letter before its send_date. Production-locked letters cannot be cancelled.

lob_self_mailers_previewA

Render a Lob proof PDF for a self-mailer without charging or sending. Returns a confirmation_token to pass to lob_self_mailers_create. Required in live mode.

lob_self_mailers_createA

Commit a self-mailer send. Billable in live mode. Requires a confirmation_token from lob_self_mailers_preview that matches the current payload (live mode only). Sizes: 6x18_bifold (default), 11x9_bifold.

lob_self_mailers_listA

List self-mailers on your Lob account. For 'how many?' counts, pass include: ['total_count'] with limit: 1 — never paginate to count. Filter by date_created (e.g. { gt: '<iso>' } for 'last N days'), size, mail_type, scheduled, or metadata. Default sort is most-recent first.

lob_self_mailers_getA

Retrieve a single self-mailer by ID.

lob_self_mailers_cancelA

Cancel a self-mailer before its send_date.

lob_checks_previewA

Validate a check payload and return a textual summary. Lob does not produce check proofs, so no PDF is rendered. Returns a confirmation_token to pass to lob_checks_create — required in live mode. The token binds the payload: committing a different amount or recipient is rejected.

lob_checks_createA

Commit a check send. HIGH IMPACT: incurs Lob fees AND draws the check amount from the linked bank account when cashed. Requires a verified bank account ID (bank_…). In live mode, requires a confirmation_token from lob_checks_preview that matches the current payload. If LOB_REQUIRE_ELICITATION_FOR_CHECKS_OVER_USD is set and amount exceeds it, an elicitation form must be confirmed by the user before dispatch.

For the bottom of the check page, Lob requires exactly one of message (plain text, max 400 chars) or check_bottom (custom template / HTML / PDF, typically paired with merge_variables).

lob_checks_listA

List checks on your Lob account. For 'how many checks?' counts, pass include: ['total_count'] with limit: 1 — never paginate to count. Filter by date_created (e.g. { gt: '<iso>' } for 'last N days'), send_date, scheduled, or metadata. Default sort is most-recent first.

lob_checks_getB

Retrieve a single check by ID.

lob_checks_cancelA

Cancel a check before its send_date. Once printed/mailed, checks cannot be cancelled — you would need to issue a stop-payment with the bank.

lob_templates_createA

Create a reusable HTML template that can be referenced by ID (tmpl_…) when creating mail pieces. Supports Handlebars-style {{variables}} for runtime substitution.

lob_templates_listA

List templates on your Lob account. By default returns slim records (no HTML body) — Lob template HTML can be many MB per entry and quickly overwhelms LLM context. Pass include_html: true to get the full HTML, or use lob_templates_get(id) for a single template. For 'how many templates?' counts, pass include: ['total_count'] with limit: 1. To find a template by name or metadata, use lob_templates_search.

lob_templates_getA

Retrieve a single template (including its published version) by ID.

lob_templates_searchA

Find templates by description substring (case-insensitive) and/or by Lob metadata. Pages through /templates server-side and returns slim matches (no HTML — use lob_templates_get(id) for the full body). Useful when you know the template by name but not by tmpl_… id.

lob_templates_updateA

Update a template's metadata or published version. To publish a new version, set published_version to a version ID (vrsn_…).

lob_templates_deleteA

Delete a template. Mail pieces already created from it are unaffected; future references will fail.

lob_template_versions_createA

Add a new version of a template's HTML. Creating a new version does NOT automatically publish it — use lob_templates_update to set published_version.

lob_template_versions_listA

List all versions of a template. Slim by default (no HTML); pass include_html: true to get the full HTML body of each version, or use lob_template_versions_get(template_id, version_id). For 'how many versions?' counts, pass include: ['total_count'] with limit: 1.

lob_template_versions_getA

Retrieve a specific version of a template.

lob_template_versions_updateA

Update the description of a template version. HTML cannot be modified after creation.

lob_template_versions_deleteA

Delete a template version. Cannot delete the currently published version.

lob_campaigns_createA

Create a campaign — a container for batched mail-piece sends with a shared creative, schedule, and audience. Creating a campaign does not by itself send mail; you trigger sends per Lob docs.

lob_campaigns_listA

List campaigns on your Lob account. For 'how many campaigns?' counts, pass include: ['total_count'] with limit: 1. Filter by date_created or metadata.

lob_campaigns_getA

Retrieve a single campaign by ID.

lob_campaigns_updateA

Update a campaign's metadata or schedule before it has been sent.

lob_campaigns_deleteA

Delete a campaign. Only allowed before send.

lob_creatives_createA

Create a campaign creative — the artwork (front/back / inside/outside / file) used by a campaign for postcards, letters, or self-mailers. Important: unlike lob_postcards_create and the other mail-piece create tools, Lob's /v1/creatives endpoint does NOT accept HTML strings, remote URLs, or inline PDFs in the content fields — it accepts ONLY a Lob template ID (tmpl_…). To use a URL or HTML as creative content, first call lob_templates_create to upload it as a template, then pass the resulting tmpl_… here. Required by resource_type: postcard → front + back; letter → file + from; self_mailer → inside + outside. Live-mode key required.

lob_creatives_getA

Retrieve a single creative by ID.

lob_creatives_updateA

Update a creative's description or metadata.

lob_creatives_deleteB

Delete a creative.

lob_buckslips_createA

Upload a buckslip — an 8.75"×3.75" promotional insert that can be included in letters. front must be a publicly-reachable PDF URL (or base64 data URI). Inventory is reserved on Lob's side and consumed when ordered. Note: Lob's buckslips API only accepts multipart/form-data, so this tool sends the body as multipart.

lob_buckslips_listA

List buckslip inventory on your account. For 'how many buckslips?' counts, pass include: ['total_count'] with limit: 1. Filter by date_created or metadata.

lob_buckslips_getA

Retrieve a single buckslip by ID.

lob_buckslip_orders_previewA

Validate a buckslip-inventory-order payload and return a textual summary. Returns a confirmation_token to pass to lob_buckslip_orders_create — required in live mode.

lob_buckslip_orders_createA

Commit a buckslip-inventory order. Billable in live mode — Lob prints and stocks the requested quantity. Requires a confirmation_token from lob_buckslip_orders_preview that matches the current payload (live mode only). If LOB_REQUIRE_ELICITATION_FOR_BULK_OVER_PIECES is set and quantity_ordered exceeds it, an elicitation form must be confirmed.

lob_buckslip_orders_listA

List orders for a specific buckslip. Note: this nested endpoint does NOT accept include: ['total_count'] — counting requires walking pages, or read aggregate fields (quantity_ordered, quantity_remaining) off the parent via lob_buckslips_get.

lob_cards_createB

Upload a card — a small printed insert (e.g. business card, plastic gift card) that can be inserted with a letter.

lob_cards_listA

List card inventory on your account. For 'how many cards?' counts, pass include: ['total_count'] with limit: 1. Filter by date_created or metadata.

lob_cards_getA

Retrieve a single card by ID.

lob_card_orders_previewA

Validate a card-inventory-order payload and return a textual summary. Returns a confirmation_token to pass to lob_card_orders_create — required in live mode.

lob_card_orders_createA

Commit a card-inventory order. Billable in live mode — Lob prints and stocks the requested quantity. Requires a confirmation_token from lob_card_orders_preview that matches the current payload (live mode only). If LOB_REQUIRE_ELICITATION_FOR_BULK_OVER_PIECES is set and quantity exceeds it, an elicitation form must be confirmed.

lob_card_orders_listA

List orders for a specific card. Note: this nested endpoint does NOT accept include: ['total_count'] — counting requires walking pages, or read aggregate fields off the parent via lob_cards_get.

lob_qr_codes_listA

List QR-code scan / analytics events for QR codes embedded in your mail pieces. For 'how many scans?' counts, pass include: ['total_count'] with limit: 1. Filter by date_scanned (e.g. { gt: '<iso>' } for 'last N days'), resource_id (scans tied to a specific mail piece), or campaign_id (scans for a whole campaign).

lob_resource_proofs_createA

Create a proof — a PDF preview of how a resource (postcard, letter, self-mailer) will print — for review before committing to a mail send. Pass resource_parameters with the same shape you would pass to the underlying create endpoint (e.g. { front, back, to } for a postcard). Note: the lob_*_preview tools call this endpoint internally; this raw tool is exposed for advanced use cases.

lob_resource_proofs_getA

Retrieve a resource proof by ID, including a URL to download the proof PDF.

lob_resource_proofs_updateB

Approve or reject a resource proof.

lob_bank_accounts_createA

Register a bank account that can be used to draw checks. Requires routing number, account number, account type, and signatory. Bank accounts must be verified (lob_bank_accounts_verify) before use in lob_checks_create.

lob_bank_accounts_listA

List bank accounts on your Lob account. For 'how many bank accounts?' counts, pass include: ['total_count'] with limit: 1.

lob_bank_accounts_getA

Retrieve a single bank account by ID.

lob_bank_accounts_deleteA

Remove a bank account. Pending checks drawn against it will continue to clear.

lob_bank_accounts_verifyA

Verify a bank account by submitting two micro-deposit amounts (in cents) that Lob deposited into the account during registration. Required before the account can be used to draw checks.

lob_webhooks_createA

Subscribe an HTTPS endpoint to receive Lob event notifications (e.g. 'postcard.mailed', 'letter.in_transit', 'check.delivered'). The endpoint must respond with 2xx within 5 seconds.

lob_webhooks_listA

List webhook subscriptions on your account. Note: Lob's /webhooks does NOT support include: ['total_count'] — for a count, just inspect data.length (webhook lists are small).

lob_webhooks_getA

Retrieve a single webhook subscription by ID.

lob_webhooks_updateA

Update a webhook's URL, event subscriptions, or description. Note: the disabled flag on the response is Lob-managed (e.g. Lob auto-disables webhooks whose delivery URL consistently fails) and is not settable by callers.

lob_webhooks_deleteB

Delete a webhook subscription.

lob_design_specs_getA

Return the design specification (dimensions, bleed, safe area, no-print zones, file requirements) for a Lob mail-piece variant. Call this BEFORE generating artwork so the design respects Lob's auto-stamped address blocks. Same data is also available as MCP resources at lob://specs/{mail_type}/{variant}.json.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
lob_design_specs_pdf_postcard_4x6Lob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/4x6_postcard.pdf
lob_design_specs_pdf_postcard_6x9Lob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x9_postcard.pdf
lob_design_specs_pdf_postcard_6x11Lob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/postcards/6x11_postcard.pdf
lob_design_specs_pdf_letter_standard_no10Lob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3.us-west-2.amazonaws.com/public.lob.com/assets/letter_template_updated+4_25.pdf
lob_design_specs_pdf_letter_flat_9x12Lob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3.us-west-2.amazonaws.com/public.lob.com/assets/letter_flat_template_updated+4_25.pdf
lob_design_specs_pdf_letter_legal_8_5x14Lob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3.us-west-2.amazonaws.com/public.lob.com/assets/Legal_Letter_updated_4_25.pdf
lob_design_specs_pdf_letter_custom_envelopeLob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/no10_env_template.pdf
lob_design_specs_pdf_self_mailer_6x18_bifoldLob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/6x18_sfm_bifold_template.pdf
lob_design_specs_pdf_self_mailer_11x9_bifoldLob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3.us-west-2.amazonaws.com/public.lob.com/assets/templates/self_mailers/11x9_sfm_bifold_template.pdf
lob_design_specs_pdf_check_standardLob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/check_bottom_template.pdf
lob_design_specs_pdf_buckslip_standardLob's official template PDF showing trim, bleed, and safe-area boundaries. Source: https://s3-us-west-2.amazonaws.com/public.lob.com/assets/templates/buckslip_template.pdf
Postcard 4×6 — JSON specA 4″×6″ postcard, full-bleed both sides. The front is fully designable. The back has a 3.2835″×2.375″ ink-free zone in the lower-right corner where Lob stamps the recipient address, IMb barcode, and postage indicia — do not place text or critical artwork there.
Postcard 6×9 — JSON specA 6″×9″ postcard, full-bleed both sides. The front is fully designable. The back has a 4″×2.375″ ink-free zone in the lower-right corner where Lob stamps the recipient address, IMb barcode, and postage indicia — do not place text or critical artwork there.
Postcard 6×11 — JSON specA 6″×11″ postcard, full-bleed both sides. The front is fully designable. The back has a 4″×2.375″ ink-free zone in the lower-right corner where Lob stamps the recipient address, IMb barcode, and postage indicia — do not place text or critical artwork there.
Letter — standard #10 double-window envelope — JSON specStandard 8.5″×11″ letter mailed in a #10 double-window envelope. The first page must reserve a 3.15″×2″ address block 0.6″ from the left and 0.84″ from the top so the recipient address shows through the bottom envelope window. Page edges need 1/16″ clear margin (no full-bleed). Up to 6 sheets per piece.
Letter — 9×12 flat single-window envelope (>6 sheets) — JSON spec8.5″×11″ letters that exceed 6 sheets ship flat (unfolded) in a 9″×12″ single-window envelope. Up to 60 sheets per piece. The page-1 address block requirement is the same as the standard variant.
Letter — 8.5×14 legal (Enterprise) — JSON spec8.5″×14″ legal-size letter, Enterprise plans only. Max 3 sheets per piece. Page-1 address block requirement is the same as the standard letter spec.
Letter — custom envelope (Enterprise) — JSON specCustom-printed outer envelope for letters, Enterprise plans only. The envelope face is 4.125″×9.5″ (#10 size). Window cutouts at fixed positions reveal the page-1 address block and an optional sender block. Limit images to ≤25% ink saturation; preferred CMYK; full-bleed allowed up to 0.125″ past trim.
Self-mailer 6×18 bifold (folds to 6×9) — JSON specFolded, tabbed self-mailer. Unfolded sheet 6″×18″, folds to a 6″×9″ piece. The outside has a 4″×2.375″ address block on the left panel where Lob stamps the recipient address — keep that area blank.
Self-mailer 11×9 bifold (folds to 6×9) — JSON specFolded, tabbed self-mailer. Unfolded sheet 11″×9″, folds to a 6″×9″ piece via a vertical fold with a 1″ flap offset. The outside has a 4″×2.375″ address block on the top panel where Lob stamps the recipient address — keep that area blank.
Check (standard, 8.5×11 page with check_bottom) — JSON specLob-controlled check page on 8.5″×11″ stock with security features (warning bands, void pantograph, fugitive ink). The top 8.5″×3.625″ block is the check itself and must remain blank in your artwork — Lob prints the MICR line and check details there. Designers control the optional logo on the check face, the check_bottom artwork (B&W only) below the check, and the optional attachment (separate B&W document, max 5 sheets / 10 double-sided pages).
Buckslip 8.75×3.75 — JSON specStandalone 8.75″×3.75″ promotional buckslip. Both sides fully designable. Trim equals bleed (Lob does not specify additional outer bleed). Keep critical art ≥0.125″ inside the trim line because of press movement.
Card 3.375×2.125 (business-card / gift-card sized) — JSON specSmall printed card, 3.375″×2.125″ with 0.125″ rounded corners. Both sides designable. Coated 2 sides with gloss varnish on 18–24pt card stock, full bleed. Lob does not publish a standalone PDF template for cards — design against these dimensions and the letter-add-on guidance.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/optimize-overseas/lob-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server