Skip to main content
Glama
Lettr MCP Server

Lettr MCP Server

Official
by lettr-com

Get Template HTML

get-template-html

Retrieve a rendered email template by project ID and slug to get its HTML body, subject line, and merge tags. Use it to fetch template content for previewing or preparing personalized sends.

Instructions

Retrieve a rendered template by project_id and slug. Returns the HTML body, the subject (if set) and the list of merge tags (each with key, name and required flag). This endpoint uses a non-standard {success, data} response envelope.

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": {
      "project_id": "<project_id>",
      "slug": "<slug>"
    },
    "name": "get-template-html"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesTemplate slug. Required.
project_idYesProject ID containing the template. Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.7.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden, and it does disclose the returned fields (HTML body, subject, merge tags with key/name/required) plus the genuinely useful warning about a non-standard {success, data} envelope. It omits authentication requirements, error behavior when the slug is not found, and whether rendering is live or cached, leaving meaningful gaps for a zero-annotation 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?

Three tightly packed sentences: purpose, return contents, and the envelope caveat are front-loaded with no filler. The only mild redundancy is naming project_id and slug again after the schema already makes them required.

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 simple two-parameter read tool with no output schema, the description supplies the return shape and the response-envelope quirk that an agent cannot get elsewhere. The remaining omission is guidance tying it to the sibling get-template, which would make selection unambiguous.

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% and both parameters are documented with types, ranges and required flags, so the baseline of 3 applies. The description names project_id and slug but adds no new meaning such as slug format, case sensitivity, or scope of the project lookup.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Retrieve') and a specific resource ('a rendered template'), and the 'rendered'/'HTML body' framing implicitly separates it from the sibling get-template, which by name alone suggests template metadata. It stops short of naming that sibling, so the differentiation must be inferred rather than read.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can tell this tool returns rendered HTML, which suggests using it when the actual output is needed. There is no explicit when-to-use statement, no exclusion (e.g., 'use get-template for metadata only'), and no mention of prerequisites such as the template needing to be published.

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