Skip to main content
Glama
JWhist
by JWhist

render_template

Generate a PDF from a DocRenders template by passing structured data. The template provides layout and styling.

Instructions

Generate a PDF from a DocRenders template by passing structured data. The template provides the document layout and styling. Use list_templates to see available templates and their required fields, or get_template for a specific template's schema.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
templateYesTemplate name (e.g. "invoice", "resume"). Use list_templates to see all available templates.
dataYesData fields for the template. Required and optional fields vary by template — call get_template to see the schema.
filenameNoName of the stored PDF file (e.g. "invoice-123.pdf"). Defaults to "render.pdf".
formatNoPage sizeA4
landscapeNoLandscape orientation
margin_topNoTop margin as a CSS length (e.g. "1in", "20mm"). Defaults to "1in".
margin_rightNoRight margin. Defaults to "1in".
margin_bottomNoBottom margin. Defaults to "1in".
margin_leftNoLeft margin. Defaults to "1in".
Behavior3/5

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

With no annotations, the description carries full burden. It discloses core behavior (PDF generation from template + data) but omits critical details: return value (binary, file path?), side effects (file storage), error handling, rate limits, or auth requirements. Some transparency is provided but significant gaps remain.

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 two sentences (~40 words) with a clear front-loaded purpose statement. Every sentence serves a purpose: first defines the tool, second provides actionable guidance. No superfluous content.

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

Completeness2/5

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

Despite 9 parameters and no output schema, the description does not explain the return value or behavior (e.g., does it return a PDF binary or store a file?). It also fails to clarify how this differs from sibling `render_template_preview`. Important gaps make it incomplete for a complex tool.

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 baseline is 3. The description adds value by linking to `list_templates` for template discovery and `get_template` for schema details, contextualizing parameters beyond their schema descriptions. This meta-information enhances understanding.

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 clearly states the tool generates a PDF from a template using structured data, identifying verb, resource, and mechanism. However, it does not differentiate from sibling tools like `render` or `render_template_preview`, leaving ambiguity about when to use this specific tool.

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 description advises using `list_templates` and `get_template` as prerequisites but does not provide guidance on when to use this tool versus siblings (e.g., `render` or `render_template_preview`). Usage context is implied but lacks explicit exclusions or alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JWhist/docrenders-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server