Skip to main content
Glama

Upload a mail-merge template (content varies per recipient)

create_template

Upload a REUSABLE template containing {{field}} placeholders (e.g. Dear {{name}}, or Balance due: {{amount}}). Choose this ONLY when the content must vary per recipient (mail merge) — recipient count is irrelevant, so a single personalized letter belongs here too. If the content is identical for everyone, use create_letter instead (this tool rejects input with no {{fields}}). Returns a documentId with kind: "html_template", a mergeFields list of the detected field names, and an estimatedPageCount. Free; no payment required.

Template source must be TEXT-BASED (html, markdown, or text) and must contain at least one {{field}}, or the upload is rejected — for a finished document with no merge fields, use create_letter.

Provide the template EXACTLY ONE way: content (inline text), contentBase64 (base64-encoded text), or url (a publicly reachable URL the server fetches). Supplying none, or more than one, is an error. Maximum upload size is 31457280 bytes (~30 MB); output page size is US Letter.

Reuse one template documentId across recipients: call create_mail_quote ONCE PER RECIPIENT, supplying that recipient's values via mergeVariables (every field in mergeFields must have a non-empty value). The server substitutes the values and renders that recipient's personalized PDF at quote time, so estimatedPageCount is only a baseline — the binding page count and price are set per quote from the actual rendered output.

Reserved address zone: a recipient address block is printed over the top ~3 inches of page 1, so the server reserves that space automatically (page-1 content is pushed below the block and may flow onto an additional page). You do NOT need to leave the top blank yourself. See the postagent://formats resource for details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic URL the server will fetch the document from. Provide exactly one source.
formatNoTemplate source format (text-based only). Inferred when omitted; inline `content` defaults to text.
contentNoInline text content (html, markdown, or text). Provide exactly one source.
filenameNoOptional original filename; used to help infer the source format.
contentBase64NoBase64-encoded binary content (pdf, docx, image). Provide exactly one source.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations are minimal, but the description provides extensive behavioral context: no payment required, input must be text-based with placeholders, maximum upload size, output page size, address zone reservation, and how estimatedPageCount is a baseline. No contradiction with annotations.

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?

Detailed and well-structured, with core purpose first followed by usage rules and technical details. Slightly verbose but every sentence adds value; front-loading is appropriate.

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?

No output schema, but description details return fields (documentId, kind, mergeFields, estimatedPageCount), explains page count behavior, and addresses address zone reservation, making it self-contained.

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%, but description adds significant value: clarifies exactly one source must be provided, infers format, and explains the contentBase64 parameter as base64-encoded text (though schema says binary, creating minor inconsistency).

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 clearly states the tool uploads a reusable template with mail-merge placeholders. It distinguishes from create_letter by specifying when each should be used.

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?

Explicitly directs to use this tool only when content varies per recipient, and to use create_letter for identical content. Also warns against uploading finished documents without merge fields.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool targets a distinct function: updates, document upload (letter/template/postcard), quoting (single, campaign, postcard), payment (x402, MPP, card checkout, detached signature), and status tracking. There is minimal overlap; even the three quote tools (create_mail_quote, create_campaign_quote, create_postcard_quote) are clearly differentiated by recipient type and workflow.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_letter, get_campaign_status, submit_paid_mail_job). Verbs are descriptive and nouns clearly indicate the resource or action. There are no mixed conventions or vague names.

Tool Count5/5

14 tools is well-scoped for a mailing and payment server. Each tool serves a distinct step in the workflow (upload, quote, pay, verify, track) without redundancy. The count is neither too low (would miss essential operations) nor too high (would overwhelm).

Completeness4/5

The tool set covers the core lifecycle: document preparation, quoting, multiple payment rails, address verification, and status tracking. Minor gaps exist, such as no explicit tool to cancel a job or list previously created documents, but these are not critical for typical use and can be worked around.

Resources