Skip to main content
Glama

Render a document

render

Creates a document by filling a stored template, or ad-hoc html, with data: a PDF or image, or DOCX, PPTX or PDF from Word and PowerPoint templates. Returns the render with status and download_url; for an image (png, jpg or webp) up to 2 MB the result also carries the picture itself, so look at what you made before handing it on (a PDF comes as its link). Use it to make a document from data; to turn an existing office file into a PDF, use convert_to_pdf, and for a Markdown document, markdown_to_pdf. Stored templates render their published version, so one whose published_version is null fails with template_not_found. Every call is a new render: a live key or a signed-in agent consumes units, a test key is free (watermarked on the Free plan). A render that fails returns status failed and an error with code and message; validate_template finds most causes beforehand. With einvoice the PDF becomes a ZUGFeRD / Factur-X e-invoice built from data._invoice (check the block with check_invoice first): the render then carries einvoice, the validator's report, and a refused invoice names the fields and rules to fix. The link expires at expires_at; get_render issues a fresh one.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "render"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoValues for the template, shaped as get_template_schema describes; leave out when it needs none
htmlNoA complete HTML document to render instead of a stored template, up to 5 MB
waitNoMost renders are finished when the call returns; true also waits for one that continues in the background, false returns it as it is (queued or rendering) to check later with get_render
engineNoTemplate language of html, when it contains expressions to fill from data
localeNoBCP 47 tag for helpers and translations, e.g. de-DE
outputNoLeft out, the template decides: PDF for PDF templates and html, its image format for image templates, its default output for Word and PowerPoint templates. Word templates render docx or pdf, PowerPoint templates pptx or pdf
einvoiceNoMakes the PDF a ZUGFeRD / Factur-X e-invoice whose XML is built from data._invoice: true for the defaults, an object to choose, false to switch off what the template declares. PDF only; live renders from the Starter plan, test keys on Free make 20 marked ones a day
filenameNoName of the file behind download_url, e.g. invoice-2026-0042.pdf
templateNoSlug or tpl_ id of a stored template; pass this or html

Output Schema

NameRequiredDescriptionDefault
idYesrnd_ id of the render
formNoWhat fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran
pdfaNoThe PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it
errorYesWhy a failed render failed
unitsYesUnits the render counted
outputNoThe format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image
statusYes
einvoiceNoThe e-invoice report, when the render made one
templateYesThe template and version rendered; null for html and conversions
expires_atYesWhen download_url stops working; get_render issues a fresh one
page_countYes
environmentYes
download_urlYesSigned link to the file; null until the render succeeded
accessibilityNoThe PDF/UA-1 verdict, when the template declares it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / form
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "What fill_pdf_form did: the fields filled, those left out (unknown name or invalid value) and those whose calculation or display format no viewer ran",
      +  "properties": {
      +    "filled": {
      +      "type": "number"
      +    },
      +    "skipped": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "field": {
      +            "type": "string"
      +          },
      +          "reason": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "field",
      +          "reason"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "warnings": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "field": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "field",
      +          "code"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "xfa_removed": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "filled",
      +    "skipped",
      +    "warnings",
      +    "xfa_removed"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / output
      Added value: +{
      +  "description": "The format of the file: pdf, png, jpg, webp, docx or pptx, or zip for the several files of split_pdf and pdf_to_image",
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / pdfa
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "The PDF/A verdict (PDF/A-2b or PDF/A-3b), when the template declares it",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive, closed-world behavior, and the description adds real context on top: every call is a new billed render, test keys are free but watermarked, failed renders return status failed with a code, and the link expires at expires_at. However, it never states how to handle partial/queued results in practice beyond the wait flag, nor what the units cost is, leaving the billing and retry model partly implicit.

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 core verb and output, then branching into validation, billing, failure and einvoice notes. Dense but nearly every sentence carries distinct information; the heavy parenthetical nesting (e.g. "a PDF comes as its link") costs some readability.

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?

Given nine parameters, nested objects, enums, and an existing output schema, the description covers the gaps structured fields cannot: template versioning failure mode, unit consumption, watermark behavior, link expiry, and the pre-flight tools that prevent failures. Nothing an agent needs to invoke it correctly appears missing.

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 description coverage is 100%, so the baseline is 3; the description nevertheless adds meaning beyond it, notably that data for einvoice must be shaped around data._invoice and that a stored template renders its published version (null published_version yields template_not_found). The remaining parameters (locale, filename, engine) get no extra semantics here, so it stops short of a 5.

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 opening clause names a specific verb and resource ("Creates a document by filling a stored template, or ad-hoc html") and enumerates the producible artifacts (PDF, image, DOCX, PPTX). It also explicitly separates itself from convert_to_pdf and markdown_to_pdf, so the agent can route without opening a schema.

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?

Explicit when-to-use ("Use it to make a document from data") plus two named alternatives with their selecting conditions (convert_to_pdf for existing office files, markdown_to_pdf for Markdown). It further routes to validate_template before rendering and check_invoice before the einvoice path.

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