Skip to main content
Glama

preview_template

Read-only

Preview a template with sample data before saving, as a sub-account would send it. Shows how the message will look with placeholder variables filled in.

ACCESS: needs a Proof account. Authenticate this client (Claude Code: /mcp → Authenticate), then call this tool again. start_login does NOT open this tool.

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": {
      "channel": "<channel>",
      "message_type": "<message_type>",
      "body": "<body>"
    },
    "name": "preview_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesTemplate body text
channelYesMessage channel
subjectNoEmail subject line
profile_idNoThe sub-account to act on; omitted → your key's sub-account, or the primary sub-account for an account-wide key
button_textNoButton text
message_typeYesMessage type
button_url_templateNoButton URL template

Output Schema

NameRequiredDescriptionDefault
previewNo
is_validNo
warningsNoWhat a save would warn about; never makes `is_valid` false. Always sent; absent from an API that predates it.
validation_errorsNoWhat a save would refuse.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / profile_id / description
      Previous value: -"The sub-account (project) to act on; omitted → your key's project, or the primary project for an account-wide key"New value: +"The sub-account to act on; omitted → your key's sub-account, or the primary sub-account for an account-wide key"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "is_valid": {},
      +    "preview": {},
      +    "validation_errors": {
      +      "description": "What a save would refuse."
      +    },
      +    "warnings": {
      +      "description": "What a save would warn about; never makes `is_valid` false. Always sent; absent from an API that predates it."
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  3. Changed1 schema field changed
    • addedInput schema / properties / profile_id
      Added value: +{
      +  "description": "The sub-account (project) to act on; omitted → your key's project, or the primary project for an account-wide key",
      +  "pattern": "^[0-9a-fA-F]{24}$",
      +  "type": "string"
      +}
  4. First observed

TDQS

A3.7/5.0
Behavior4/5

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

The description is consistent with readOnlyHint=true — previewing is a non-mutating operation. Beyond the annotations it adds genuine behavioral context: the render is scoped to a sub-account's perspective and requires a Proof account with client-side authentication (/mcp), with an explicit warning that start_login will not unlock it. That authentication detail is valuable and not present in the structured fields.

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?

The core capability is front-loaded in the first sentence, and the access note is confined to a separate, clearly labeled block. It is efficient, though the authentication paragraph is somewhat verbose for what is essentially a prerequisite.

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 an output schema present, the description need not explain return values, and the auth prerequisite is covered. What remains missing is a pointer to the closely related render_template sibling, which is the one ambiguity an agent would face when choosing this tool.

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 description coverage is 100% and both enums (channel, message_type) plus the profile_id default semantics are documented in the schema itself. The description only adds the general notion of placeholder filling, not per-parameter meaning, so the 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+resource ('Preview a template') with the key qualifier that it renders with sample data as a sub-account would send it, and explains that placeholder variables get filled in. It is clear what the tool does, but it never mentions how it differs from the sibling render_template, which an agent could easily confuse it with.

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 phrase 'before saving' implies the usage context (drafting/editing a template), but there is no explicit statement of when to prefer this over render_template or get_template, and no exclusions. Usage is inferable rather than spelled out.

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.