Skip to main content
Glama
Lettr MCP Server

Lettr MCP Server

Official
by lettr-com

Create Template

create-template

Create an email template from HTML or Topol editor JSON, with merge tags extracted automatically. Set purpose as transactional or campaign at creation since it cannot be changed later.

Instructions

Create a new email template with HTML or Topol editor JSON content. Provide either html or json — they are mutually exclusive. Merge tags are automatically extracted from the content.

Set purpose deliberately. It defaults to transactional, and it cannot be changed after creation. A campaign can only send a template whose purpose is campaign, so a newsletter or promotion created with the default has to be recreated from scratch. If the user is writing anything that goes to an audience list, pass purpose: "campaign".

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "create-template"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlNoHTML content for the template. Mutually exclusive with json. Use {{VARIABLE}} syntax for merge tags.
jsonNoJSON content for Topol visual editor templates. Mutually exclusive with html.
nameYesName of the template (max 255 characters)
purposeNoWhat the template is for. **transactional** (default) is triggered by one user's action — a receipt, password reset, alert. **campaign** is marketing sent to an audience list, and is the ONLY kind a campaign can send. This cannot be changed later: a newsletter created as transactional must be recreated.
folder_idNoFolder ID within the project. If not provided, uses the first folder. Use list-folders to find one.
project_idNoProject ID to create the template in. If not provided, uses the team's default project.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description must carry the behavioral burden, and it does: it discloses automatic merge-tag extraction, that purpose defaults to transactional, and that purpose is immutable after creation so a mis-typed template must be recreated. It does not cover permissions, duplicate-name behavior, or what the call returns, so it stops short of full disclosure for a mutation tool.

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 lead sentence is front-loaded with the core action and content formats, and the purpose warning is set off with emphasis so it is hard to miss. The immutability point is stated twice in slightly different words, which is mild redundancy but defensible for a costly mistake.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter mutation tool with no annotations and no output schema, the definition covers content formats, merge tags, and the purpose trap well, but says nothing about the return value (presumably a template ID) or what happens on invalid folder/project IDs. Adequate but with clear gaps for a create operation.

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 description coverage is 100%, so every parameter, including the purpose enum and folder_id/project_id defaults, is already documented in the schema. The description mainly restates the purpose semantics and mutual exclusivity with added emphasis ('recreated from scratch') rather than adding new syntax or constraints, so baseline 3 applies.

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?

States a specific verb and resource (create a new email template) and immediately names the two content forms it accepts (HTML or Topol editor JSON). That is enough to distinguish it from get-template, update-template, and delete-template without opening any 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?

Explicitly says html and json are mutually exclusive, and gives concrete when-to-use guidance for the purpose parameter: transactional for one-user triggers, campaign for anything going to an audience list, with the stated consequence of getting it wrong. It names the condition that selects each mode rather than leaving it to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.