Skip to main content
Glama

render_template

Render any readable template (curated library row or caller-owned) to a real PDF. BILLED — consumes credits at the rate of 1 credit per 10 pages. Returns JSON metadata (pageCount, creditsDeducted, creditsRemaining, artifactId) plus the PDF bytes as an embedded base64 resource. On the free plan the PDF is watermarked; paid plans render clean. Mirrors POST /api/v1/render with the { templateId, data } body shape. Use render_dsl_preview first to confirm the layout — that's free and watermarked. Only call this once you're confident the template is right.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoBinding data substituted into {{var}} expressions. Falls back to the template's sampleData when omitted.
titleNoOptional document title (shown in PDF metadata).
templateIdYesTemplate ID — slug for library rows (e.g. 'invoice-classic') or UUID for user rows.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries full behavioral disclosure. It flags that this tool is 'BILLED', explains the credit rate, mentions free-plan watermarks, describes the JSON metadata returned, and notes the PDF bytes are embedded as base64. This is unusually transparent for a mutation/billing operation.

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?

The description is dense but every sentence earns its place. It front-loads the core purpose and the critical billing warning, then covers return format, watermarking, API shape, and the recommended alternative workflow without wasted words.

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?

There is no output schema, yet the description explicitly lists the return metadata fields (pageCount, creditsDeducted, creditsRemaining, artifactId) and the embedded base64 PDF. It also covers billing consequences, free-plan behavior, and the recommended preview workflow, making this fully complete for an agent deciding whether and how to invoke the 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?

The schema already documents all three parameters at 100% coverage, so the high-coverage baseline of 3 applies. The description adds little beyond the schema for parameters, aside from noting the API body shape mirrors '{ templateId, data }', which is marginal. It does not introduce missing parameter details, but it also doesn't need to given the schema's completeness.

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?

The description uses a specific verb ('Render') and resource ('any readable template — curated library row or caller-owned') and clearly states the output: 'a real PDF'. It distinguishes this from sibling tools by emphasizing the paid rendering path versus the free 'render_dsl_preview', so an agent can immediately tell what this tool does.

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?

It explicitly instructs the agent to use 'render_dsl_preview' first for free, watermarked layout confirmation, and says to call this tool only 'once you're confident the template is right.' It also names the alternative directly and provides a clear selection criterion between paid rendering and free preview.

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