Skip to main content
Glama

preview_email

Render a saved email template or draft for a specific ERP record in a chosen language and timezone, returning the subject, HTML, errors, and source to verify customer-facing output before sending.

Instructions

Render an email for one record: a saved one (email_template_id) or a draft (subject + body_html, optional translations). language (de_DE, fr...) shows it as a customer with that language gets it; timezone (IANA) is where its datetimes print. Returns {subject, html, errors, source, record}; no credits.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "preview_email"
  }
}

Input Schema

NameRequiredDescriptionDefault
subjectNo
languageNo
timezoneNo
body_htmlNo
record_idNo
bind_modelNosale.order
translationsNo
email_template_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.7/5.0
Behavior4/5

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

With zero annotations, the description carries the full load and does reasonably well: 'Render' and 'preview' signal a non-mutating operation, the return shape {subject, html, errors, source, record} is spelled out including an errors channel, and 'no credits' discloses that the call is free. It never explicitly states that nothing is persisted or that the record must already exist, which is the remaining gap.

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?

Three sentences, front-loaded with the purpose, then mode split, then parameter meanings, then return shape. Every clause carries information ($language example format, IANA, no credits); nothing repeats the schema verbatim or pads the definition.

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 an 8-parameter tool with no annotations and no output schema, the description covers purpose, both modes, rendering-locale params, and a hand-written return contract — substantial. What it omits is how the record is bound: record_id is undocumented and bind_model's enum and default are never mentioned, which is a meaningful gap for a tool whose premise is 'render for one record'.

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 0%, so the description must compensate: it explains email_template_id, subject, body_html, translations, language (with a de_DE/fr format hint) and timezone (IANA), which is real added value. But it is silent on record_id and on bind_model, the enum that determines which model the record belongs to (sale.order, account.move, purchase.order, res.partner) — arguably the most consequential parameter for a per-record render.

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 ('Render an email for one record') and immediately splits the tool into its two operating modes: a saved template via email_template_id or an ad-hoc draft via subject + body_html. That is well beyond a restated name. It loses a point because it never distinguishes itself from the similarly named sibling render_preview, which an agent could easily confuse with it.

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?

The description makes the two internal modes explicit (saved vs draft), which is genuinely useful selection guidance within the tool. However, it offers no guidance on when to pick this over render_preview, validate_layout, or get_sample_record among 25 siblings, and states no prerequisites or exclusions. Usage is therefore implied rather than directed.

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