Skip to main content
Glama
Resend Email MCP

Resend Email MCP

Create Template

create-template

Creates a draft email template in Resend from HTML with variables, subject, sender, and reply-to details, so teams can review and publish it before sending.

Instructions

Create a new email template in Resend. Templates are created in draft status. Use publish-template to make them available for sending. Variables use triple-brace syntax in HTML: {{{VAR_NAME}}}.

Workflow: create-template → get-tiptap-json-content (with include_schema: true) → compose-template → publish-template.

Content options after creating:

  • compose-template (recommended): Sets TipTap content that the user can visually edit in the Resend dashboard. Use this when the user wants to collaborate on or refine the template in the editor.

  • update-template with html/text: Sets static HTML/text content. Use this only when the user explicitly wants to set raw HTML. Switching between compose and html/text modes is lossy — some content or formatting may be lost. Ask the user before switching.

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>",
      "html": "<html>"
    },
    "name": "create-template"
  }
}

Input Schema

NameRequiredDescriptionDefault
fromNoSender email address (e.g., "Your Name <sender@example.com>"). Can be overridden when sending.
htmlYesThe HTML content of the template. Use triple-brace syntax for variables: {{{VARIABLE_NAME}}}. Email HTML requirements — follow all of these without exception: STRUCTURE - Always include <!DOCTYPE html>, <html>, <head>, <body> - Layout must be table-based: <table>, <tr>, <td> — never use <div> for layout - Outer wrapper table at width="100%", inner content table at max 600px wide - Every table must have cellpadding="0" cellspacing="0" border="0" CSS - All styles must be inline (style="...") — no <style> tag, no external stylesheets - No flexbox, no grid, no CSS variables, no CSS shorthand (use padding-top not padding) - font-family must always include web-safe fallbacks (Arial, Helvetica, Georgia, sans-serif) - Always set font-size, line-height, and color explicitly on every text element IMAGES - Always set width, height, border="0", display:block on every <img> - Use absolute URLs only — no relative paths - Always include alt text LINKS & BUTTONS - Never use <button> — use <a> styled as a button inside a <td> - No <video>, <form>, or <input> elements - No JavaScript of any kind OUTLOOK COMPATIBILITY - Use bgcolor attribute on <td> alongside CSS background-color - No CSS background-image (poor Outlook support) - Add <!--[if mso]> conditionals where needed for Outlook rendering META (in <head>) - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <meta http-equiv="X-UA-Compatible" content="IE=edge">
nameYesThe name of the template.
textNoPlain text version of the message. If omitted, HTML will be used to generate it. Pass an empty string to disable automatic text generation.
aliasNoAn alias for the template. Can be used instead of the ID to reference the template.
replyToNoDefault Reply-to email address(es). Can be overridden when sending.
subjectNoDefault email subject. Can be overridden when sending.
variablesNoArray of template variables (up to 50 per template).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.28.2
    • removedInput schema / properties / variables / items / properties / fallbackValue / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / variables / items / properties / fallbackValue / type
      Added value: +[
      +  "string",
      +  "number",
      +  "null"
      +]
  2. Changed2 schema fields changedv2.12.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / text / description
      Previous value: -"Plain text version of the message. If not provided, HTML will be used to generate it."New value: +"Plain text version of the message. If omitted, HTML will be used to generate it. Pass an empty string to disable automatic text generation."
  3. First observedv2.10.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does well: it discloses that new templates start as drafts and require publish-template to become sendable, that mode switching can lose content, and the variable interpolation syntax. It does not say what the call returns (e.g., a template ID) or what happens on alias/name conflicts, which matters since there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and draft consequence in two sentences, then uses a compact workflow line and a short two-bullet comparison. Bold labels and the arrow chain make the routing information scannable rather than buried.

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 an 8-parameter mutation tool with no annotations and no output schema, this covers the hard parts: lifecycle state, the required follow-up tools, and the content-mode tradeoff. It omits the return payload and error conditions (alias collisions, validation failures on reserved variable names), leaving a modest gap.

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% and the html parameter already documents the triple-brace syntax and email HTML constraints, so the description mostly earns baseline credit. It does add decision-level meaning by framing html as the 'static/raw' path versus compose-template's TipTap content, clarifying which content parameter to populate and why.

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 in Resend') plus the resulting state ('Templates are created in draft status'). It explicitly distinguishes itself from publish-template, compose-template, and update-template, so an agent can place it without opening sibling schemas.

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?

Gives an explicit ordered workflow (create → get-tiptap-json-content → compose-template → publish-template) and a decision rule between the two content paths: compose-template when the user wants to edit collaboratively, update-template with html/text only when raw HTML is explicitly wanted. It also warns that switching modes is lossy and to ask the user first.

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

Deploy Server

Other Tools