Skip to main content
Glama

Render Template Preview

render_template_preview
Read-onlyIdempotent

Render a template preview with provided data: the email exactly as the template produces it.

'template_format' documents the template format. The sender identity in the template header must exist; otherwise rendering returns an error.

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": {
      "TemplateToken": "<TemplateToken>",
      "TemplateData": "<TemplateData>"
    },
    "name": "render_template_preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
TemplateDataYesData to populate template variables.
TemplateTokenYesTemplate token. Create with 'create_template_draft' or 'get_template' tools.

Output Schema

NameRequiredDescriptionDefault
ToNoResolved To addresses.
FromNoResolved From address.
HTMLYesRendered HTML preview body. Consumed by the preview UI.
ResultNoResult message.
SourceYesRaw template source. Consumed by the preview UI.
SubjectNoResolved Subject.
PreviewURLNoSet only when the host did not advertise MCP Apps UI support: URL to open the preview in a browser. Served locally until ~30 minutes after creation.
UnavailableNoTrue when this preview was evicted from the server cache and can no longer be displayed.
OtherHeadersNoOther resolved headers (Cc, Bcc, Reply-To).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish this as a read-only, idempotent, non-destructive, closed-world operation. The description adds value beyond that by disclosing a failure mode: rendering errors if the sender identity in the template header does not exist, and confirming the return is the fully rendered email.

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 short sentences, front-loaded with the core action and result, followed by a format pointer and a prerequisite. The mid-sentence '"template_format" documents the template format' is slightly redundant but not wasteful.

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 rich annotations, an output schema, and 100% parameter coverage, the description only needed to add the rendering failure condition and output nature, which it does. Nothing critical for correct invocation appears missing.

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 coverage is 100%, so both TemplateToken and TemplateData are already documented with format, pattern, and token-creation pointers. The description adds only a light restatement ('provided data') and a pointer to 'template_format', so baseline 3 applies.

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?

States a specific verb and resource: renders a template preview with provided data, and clarifies the output is the email exactly as the template produces it. This distinguishes it from retrieval siblings like get_template or get_template_content, though it does not explicitly name a nearest alternative such as create_post_preview.

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 implied by the description plus the schema pointer to 'create_template_draft'/'get_template' for tokens, and a prerequisite (sender identity must exist) is given. However, there is no explicit when-to-use vs. when-not guidance relative to siblings like send_template_draft_test_email or create_post_preview.

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.