Skip to main content
Glama

Render email preview

render_email_preview
Read-onlyIdempotent

Render an email document with the workspace brand, without sending. Returns {subject, html, text}. Errors: invalid_document, unknown_variable (add a fallback like {{FIRST_NAME|Friend}} or pass vars), missing_address, invalid_variable. Next: send it, or fix the document and render again.

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": {
      "document": "<document>"
    },
    "name": "render_email_preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
varsNoValues for {{NAME}} variables, such as {"FIRST_NAME":"Ana"}.
documentYesThe email document: {version:1, style:"designed"|"plain", subject, preheader?, blocks:[{type:"heading",text,level}|{type:"text",text}|{type:"button",label,url}| {type:"image",src,alt,href?}|{type:"divider"}|{type:"footer",unsubscribe}| {type:"rows",rows:[[label,value],...]}|{type:"code",code}]}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds real value beyond that: it discloses the return shape {subject, html, text}, enumerates four concrete error codes, and gives remediation for unknown_variable, which the annotations cannot express.

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?

Four short sentences, each doing distinct work: purpose, return value, error taxonomy, next step. The purpose and the "without sending" guard are front-loaded and there is no filler.

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?

With only two parameters, one required, and no output schema, the description covers what an agent needs: it substitutes for the missing output schema by naming return fields and lists the failure modes it will encounter. Minor gap is that it does not say whether errors abort rendering entirely or what a partially rendered document yields.

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%, so baseline is 3; the description still earns credit by explaining the vars remediation path and the {{FIRST_NAME|Friend}} fallback syntax, which is behavior the schema's terse vars description does not convey. It does not explain the document block structure, but the schema already does that thoroughly.

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 ("Render an email document") plus the key scope qualifier "without sending" and "with the workspace brand", which immediately separates it from send_email and from design/settings tools. An agent can identify the operation without opening the schema.

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

Usage Guidelines4/5

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

The closing sentence gives a clear next-step workflow: "Next: send it, or fix the document and render again," which tells the agent this is a pre-send validation/preview step. It stops short of naming send_email explicitly or stating when to skip rendering, so it is strong but not fully explicit about alternatives.

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.

Resources