Skip to main content
Glama

Render a document

render
Idempotent

Render a template plus a JSON payload into a PDF, PNG or JPG and return a signed URL. This is the one tool most calls need.

Small jobs finish inside the call and come back status: "succeeded" with a url you can hand straight to a user. Anything with a webhook_url, async: true or a large payload comes back status: "queued" with an id for get_render.

Renders are deterministic and cached: the same template version, data and options return the stored object with cached: true, free and instant. Billing is per PNG or JPG and per PDF page; cache hits are never billed.

No API key needed to start — the first call mints a trial of 10 PDF pages or 10 images and returns its token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe JSON payload for the template, matching its schema. Call get_template for the schema, or validate_data to dry-run a payload for free.
asyncNoForce the queued path even for a small job. Default false: small jobs finish inside the call and come back with a URL already.
formatNoOutput format. Defaults to `pdf` for chromium templates and `png` for satori ones. `webp` is not supported in v1.
optionsNoRender options, merged over the template's own defaults. Options are part of the cache key, so two calls that differ only here are two different renders.
templateYesTemplate to use: `invoice` for the latest version, or `invoice@3` to pin version 3. Pin the version in anything you ship — a new version changes the output and the cache key. Call list_templates to see what this account has.
webhook_urlNoAbsolute https URL to POST the finished render to. Supplying one forces the queued path: the call returns immediately with status `queued`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / options / properties / margin / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "bottom": {
      -        "type": "string"
      -      },
      -      "left": {
      -        "type": "string"
      -      },
      -      "right": {
      -        "type": "string"
      -      },
      -      "top": {
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "properties": {
      +      "bottom": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      },
      +      "left": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      },
      +      "right": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      },
      +      "top": {
      +        "type": [
      +          "string",
      +          "number"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / options / properties / margin / description
      Previous value: -"PDF margins, CSS lengths: `18mm`, or per side."New value: +"PDF margins, CSS lengths in `in`, `px`, `cm` or `mm`: `18mm`, or per side. A bare number is px."
  2. First observed

TDQS

A5/5.0
Behavior5/5

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

Beyond annotations (idempotentHint, openWorldHint), the description discloses caching behavior ('deterministic and cached', `cached: true`), billing rules (per page/image, cache hits free), a free trial, sync/async return statuses, and even error handling for blocked assets via on_blocked_asset. It adds substantial operational context that annotations alone do not provide, with no contradiction.

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 long but every sentence earns its place. It front-loads the core purpose, then progressively covers sync/async, caching, billing, and trial. There is no filler; each paragraph adds essential behavioral detail. Structure is logical and scannable.

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 the tool's complexity (nested options, multiple output formats, async flows), the description covers all key aspects: return statuses with URLs/ids, caching, billing, trial, error behavior, and cross-references to related tools. It even hints at response shape (status, url, cached) despite lacking an output schema. An agent has everything needed to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is 100%, the description enriches parameter understanding: it explains that options are part of the cache key, clarifies template version pinning semantics (`invoice@3`), and links data to validation via validate_data. This goes well beyond the schema's field descriptions, giving the agent practical guidance.

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 opens with a precise verb+resource: 'Render a template plus a JSON payload into a PDF, PNG or JPG and return a signed URL.' It also distinguishes itself from siblings by calling itself 'the one tool most calls need' and later references get_render, validate_data, get_template, and list_templates, making the primary purpose unmistakable.

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 explains when to use the sync vs async path, when to call get_render for queued jobs, and points to validate_data for dry-runs and get_template for schemas. It also advises pinning template versions in production. This is direct guidance on when to use this tool versus alternatives, with no ambiguity.

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