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.9/5.0
Behavior5/5

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

Annotations already indicate it's a write operation (readOnlyHint=false). The description adds many behavioral details: rejection if no fields, return values (documentId, kind, mergeFields, estimatedPageCount), max upload size, page size, reserved address zone, and quoting details. No contradictions 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?

Well-organized and front-loaded with key points (purpose, when to use, return values). Each paragraph serves a purpose, though it's relatively long. A slight reduction in length could be possible without losing information.

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?

Given the tool's complexity (multiple source options, merge fields, integration with other tools), the description is very complete. It covers usage, constraints, return values (despite no output schema), and context for sibling tools. No major gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions. Description adds meaning beyond schema: explains 'exactly one source' rule, max upload size 30 MB, output as US Letter, and how format can be inferred. Also clarifies that merging happens later via create_mail_quote.

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 it uploads a reusable template with placeholders for mail merge, and explicitly distinguishes from sibling tool 'create_letter' which is for identical content. The title also reinforces the purpose.

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 says when to use (content varies per recipient) and when not (identical content, use create_letter). Also provides guidance on how to provide source, rejection criteria, and integration with other tools.

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.4/5.0
Disambiguation4/5

Most tools have clearly distinct purposes: separate quote tools for campaigns, letters, and postcards; distinct payment paths; and no overlapping fundamental operations. The only slight ambiguity is between prepare_mail_payment and submit_paid_mail_job, but descriptions clarify different flows.

Naming Consistency5/5

All tool names strictly follow a verb_noun pattern in snake_case, e.g., create_letter, get_mail_job_status, pay_mail_with_shared_payment_token. The convention is uniform across all 13 tools, making them predictable and easy to navigate.

Tool Count5/5

13 tools are well-scoped for a mailing service: content creation (3), quoting (3), payment (4), status checking (2), and address verification (1). No unnecessary duplication, and the count is typical for a focused MCP server.

Completeness4/5

The core workflow (create content, get quotes, pay, track) is fully covered. Minor gaps exist: no tools for listing or deleting uploaded documents/templates, and no batch job status endpoint for individual mail jobs. However, these are not critical dead-ends for the primary use case.