Skip to main content
Glama

Render a template

render_template

Generate a PDF from a saved or built-in template and JSON data, returning it as base64 or saving it to a local path.

Instructions

Render a saved or built-in template with JSON data into a PDF. Returns it like render_pdf.

Input Schema

NameRequiredDescriptionDefault
idYesA template id from list_templates, e.g. "tpl_…" or "invoice".
dataNoThe values the template uses.
testNoTest render: watermarked, free, not counted against the quota.
optionsNoPage options that override the template's own (format, margin, …).
save_toNoWrite the file to this path on this machine instead of returning it as base64. The folder must exist. Use it for large files.
filenameNoFile name for the Content-Disposition header.
overwriteNoReplace the file at save_to if it already exists. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the disclosure burden and does add some value by stating the return is a PDF delivered like render_pdf. It says nothing about quotas, template-not-found failures, or that a test render is free and watermarked (that lives only in the schema). Given there are no annotations, more behavioral context would be expected.

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?

Two short sentences, front-loaded with the action and output format, with no wasted wording. The cross-reference to render_pdf is compact and lands before any procedural detail.

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?

For a 7-parameter tool with nested objects and no output schema, the description states the return form (a PDF, base64 or written to disk per save_to) which is the key missing piece otherwise. The fully documented schema covers the rest, though error and quota behavior remain unaddressed.

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%, so every parameter is already documented including test, save_to, overwrite, and the template id source. The description only echoes 'with JSON data' for the data parameter, which does not exceed the schema. Baseline 3 applies when the schema does the heavy lifting.

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?

The description names a specific verb and resource (render a saved or built-in template) and the output format (PDF), so an agent can tell it apart from render_pdf and screenshot at a glance. It does not fully clarify the boundary with render_pdf, since it only references it as a return-format analogue rather than stating what render_pdf itself does.

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 'saved or built-in template' phrasing and the id reference to list_templates, so an agent can infer this is the tool for template-driven PDFs. There is no explicit when-to-use versus render_pdf, and no guidance on when a template is worth using over raw rendering.

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