Skip to main content
Glama

render_document_pdf

Destructive

Turn a template (or an already rendered HTML document) into a PDF via the tenant's hosted browser, and store it. Source: either template_id/key (+ variables) or document_id of an HTML document. Page size and margins come from the template's own CSS — nothing is added here, because two millimetres are enough to push a DIN 5008 address block out of the envelope window. Returns document_id; view it with get_document_link, send it with send_email(attachments) or send_letter(document_id). Needs a browser service under Integrations (provider 'browser').

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_document_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyNoTemplate key (alternative to template_id)
titleNoTitle of the stored PDF document
variablesNoValues for the template's {{placeholders}}; arrays of objects for {{#each list}} blocks.
document_idNoAn HTML document to convert, instead of a template.
template_idNoID of the template

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / key / description
      Added value: +"Template key (alternative to template_id)"
    • addedInput schema / properties / template_id / description
      Added value: +"ID of the template"
    • addedInput schema / properties / title / description
      Added value: +"Title of the stored PDF document"
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Adds real context beyond the annotations: a prerequisite browser service under Integrations (provider 'browser'), the fact that page size and margins come from the template's own CSS with nothing injected, and that the output is persisted and returned as document_id. It does not explain the non-idempotent/destructive annotation (each call appears to create a new stored document) or what happens on browser-service failure.

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 action and source options, then prerequisites and follow-ups; every clause carries information. The DIN 5008 envelope-window aside is a rationale rather than noise, though it is the most expendable sentence.

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?

Covers source selection, prerequisites, output identifier, and next steps for a mutation tool with no output schema and no required parameters. Remaining gap is the behavioral meaning of the destructive/non-idempotent hints, which the description never addresses directly.

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 the schema already documents all five parameters and the baseline is 3. The description does add one thing the schema lacks: the either/or relationship between template_id/key plus variables and document_id, which no schema constraint encodes.

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?

States a specific verb and resource ('Turn a template ... into a PDF ... and store it') plus the two accepted source modes. It also implicitly separates itself from the sibling render_document_template by accepting an already rendered HTML document via document_id.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear selection guidance between the two source modes (template_id/key plus variables, or document_id of HTML) and names concrete follow-up tools (get_document_link, send_email attachments, send_letter). It stops short of an explicit when-to-use-this-vs-render_document_template rule or any when-not-to-use exclusion.

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.