Skip to main content
Glama

text_template

Read-only

Mustache template render — Render a Mustache template with JSON data, offline and spec-compliant (passes all 136 official Mustache spec tests: interpolation, dotted names, sections, inverted sections, lists, comments, partials with indentation, set delimiters, standalone-line rules). template= (URL-encode it; # must be %23, up to 50,000 chars), data= JSON object (optional; omit it to just list the variables the template expects), partials= JSON object of name to template (optional), escape=html (default, escapes & < > quote apostrophe) or none, strict=true returns 422 when any variable or partial is missing. Returns the rendered text plus every variable with its kind (var, raw, section, inverted, partial) and the section it sits in, missing variables, absent sections, values missing in only some loop iterations, and warnings. Syntax errors return 422 with line and column. Use it for email, SMS, prompt and report templates. Price: $0.001 USDC (Base, via x402).

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": {
      "template": "<template>",
      "data": "<data>"
    },
    "name": "text_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataYes{"name":"Ada","order_id":"A-1001","items":[{"qty":2,"title":"Pen"},{"qty":1,"title":"Notebook"}],"total":"$7.50"}
templateYesHi {{name}}, your order {{order_id}} has {{#items}}{{qty}} x {{title}}; {{/items}}total {{total}}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the supplied annotations by disclosing escape semantics, the 422 failure mode for strict mode and syntax errors (with line/column), and the cost/transport detail ($0.001 USDC on Base via x402) that an agent needs before invoking. It also spells out the full shape of the returned report, which the annotations do not cover.

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?

Front-loaded with the capability, then parameter notes, then return shape, then cost — a sensible ordering. The parenthetical enumerating all 136 spec features is closer to marketing than operational guidance and could be trimmed without losing information an agent needs.

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 no output schema, the description carries the burden of explaining return values and does so thoroughly, including the variable inventory, missing variables, and partial-iteration gaps. The remaining defect is the required/optional conflict on data and the undocumented-in-schema extra parameters, which leaves the invocation contract internally inconsistent.

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?

Adds substantial meaning beyond the schema: URL-encoding requirement with the concrete example that # must be %23, the 50,000-char cap, and the accepted values for escape and strict. It loses a point because partials, escape, and strict are described as inputs but do not appear in the schema at all, and because the description calls data optional while the schema marks it required — an agent cannot tell which contract is authoritative.

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?

Opens with a specific verb+resource ('Mustache template render') and immediately differentiates itself from the neighboring text_* utilities by naming the exact format and spec it implements. An agent knows precisely what capability this provides before reading any 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?

Gives concrete usage contexts ('email, SMS, prompt and report templates') and a distinct mode of use ('omit data to just list the variables the template expects'). It stops short of explicit when-not guidance or naming an alternative tool, but for a narrowly-scoped renderer that gap is minor.

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