Skip to main content
Glama

Generate a document

render_document

Render a structured document to a PDF from a named template (invoice, receipt, report). Money/totals are computed for you. Returns a file_id (for chaining) and a ~1h download URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesTemplate data. invoice/receipt: {seller:{name,address?,email?,logo_url?(data: URI)}, buyer?:{name,address?,email?}, number?, issued?/date?, due?, currency?, items:[{description,qty,unit_price}], tax_rate?, notes?, terms?}; receipt also takes amount_paid?, payment_method?. report: {title, subtitle?, author?, date?, sections:[{heading?,body?}]}. Money is computed server-side.
templateYesDocument template.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / data / description
      Previous value: -"Template data. invoice: {seller:{name,address?,email?,logo_url?(data: URI)}, buyer?:{name,address?,email?}, number?, issued?, due?, currency?, items:[{description,qty,unit_price}], tax_rate?, notes?, terms?}. Money is computed server-side."New value: +"Template data. invoice/receipt: {seller:{name,address?,email?,logo_url?(data: URI)}, buyer?:{name,address?,email?}, number?, issued?/date?, due?, currency?, items:[{description,qty,unit_price}], tax_rate?, notes?, terms?}; receipt also takes amount_paid?, payment_method?. report: {title, subtitle?, author?, date?, sections:[{heading?,body?}]}. Money is computed server-side."
    • changedInput schema / properties / template / enum
      Previous value: -[
      -  "invoice"
      -]New value: +[
      +  "invoice",
      +  "receipt",
      +  "report"
      +]
  2. Added

TDQS

A4/5.0
Behavior3/5

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

The description mentions that it returns a file_id and a ~1h download URL, which helps set expectations. However, with readOnlyHint false and destructiveHint false, it does not disclose whether file creation has persistent storage or cleanup side effects beyond the temporary URL.

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 concise and well-structured, using two sentences with parenthetical examples for templates. It front-loads the core action and includes the key return information without unnecessary detail.

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?

The description provides the essential return behavior (file_id and download URL) and notes chaining capability. Since there is no output schema, this is sufficient for basic usage, though error cases or validation requirements are not mentioned.

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 coverage is 100%: both template and data are described in the schema, including the enum values and nested data structure. The tool description adds little beyond the schema, though it reinforces that totals are computed automatically.

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 clearly states that the tool renders a structured document to a PDF from a named template, naming invoice, receipt, and report. This specific behavior distinguishes it from sibling tools like markdown_to_pdf or render_html_to_pdf.

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?

The use case is clear from 'named template' and 'Money/totals are computed for you', implying it is for templated documents with automatic totals. It does not explicitly name alternatives or exclusions, but the context makes the intended use understandable.

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