Skip to main content
Glama

preview_template

Read-only

Render a template with sample data to preview exact output and verify required data fields before sending a message.

Instructions

Render a template with sample data to see the exact text a person would get, without sending anything. Use it to check which data a template needs before send_message; list_templates gives the keys. Needs an admin key, so agent keys get 403.

Returns locale (the one used) and variants: the rendered title, body, url and other content under default and under each channel with its own override. Fails with 404 for an unknown template and 422 when it cannot be rendered.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoSample template variables, read as `data`. Defaults to {}.
localeNoLocale to render, e.g. `uz`. Omitted, the server's default is tried; a locale the template lacks falls back to its default.
templateYesTemplate key, e.g. `order-shipped`, from list_templates.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.1
    • addedInput schema / properties / data / description
      Added value: +"Sample template variables, read as `data`. Defaults to {}."
    • addedInput schema / properties / locale / description
      Added value: +"Locale to render, e.g. `uz`. Omitted, the server's default is tried; a locale the template lacks falls back to its default."
    • addedInput schema / properties / template / description
      Added value: +"Template key, e.g. `order-shipped`, from list_templates."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it discloses the key behavioral traits: no message is sent, an admin key is required, and it fails with 404 for unknown templates and 422 when rendering fails. This is exactly the out-of-band context annotations cannot carry.

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-loaded with the core action, then routing guidance, then return and error behavior. Three sentences, each carrying distinct, non-redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description usefully documents the return shape (locale and variants with title/body/url per channel) as well as error codes and auth requirements, leaving nothing important for correct invocation missing.

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 parameters are already documented; however the description adds meaning about `data` (sample variables whose needed keys come from list_templates) and `locale` fallback behavior, going slightly beyond the schema text.

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 precise verb+resource (render a template with sample data) and clarifies the non-sending nature that separates it from send_message. It also names list_templates as the source of keys, so an agent can place it among siblings without reading 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?

Explicitly says to use it to check which `data` a template needs before send_message, naming the alternative and the ordering condition. It also states the auth consequence (admin key required, agent keys get 403), which is decisive for tool selection.

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