Skip to main content
Glama

Render invoice PDF

invoice_pdf

Generate an A4 PDF for a stored invoice, including issuer, bill-to, dates, items, taxes, and totals. Returns the file path; free version adds a credit line, Pro uses your logo unbranded.

Instructions

Call this tool to write one stored invoice as an A4 PDF and return the path: issuer, BILL TO, dates, items, taxes and totals. Free stamps a credit line and no logo; Pro renders it unbranded with your logo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesInvoice number to render, as returned by invoice_create
out_pathNoWhere to write the PDF; defaults to <data dir>/pdf/<number>.pdf. The page carries the issuer block, the BILL TO client block, dates, an item table with wrapped descriptions, subtotal, discount, one tax line per rate, the total, payment details and notes, and every money value on it carries its currency code. Use a .pdf path: the bytes written are always PDF

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.20.0

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It reveals that the tool writes a PDF file, returns the path, and includes branding differences between Free and Pro plans. However, it does not disclose overwriting behavior, error conditions (e.g., nonexistent invoice), or any side effects beyond file creation, leaving some behavioral aspects undocumented.

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 with zero filler. The first sentence front-loads the primary purpose and content, and the second adds the branding distinction. Every word earns its place, making it highly concise and well structured.

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?

Given the tool's simplicity (2 params, no output schema) and the rich schema descriptions, the description provides sufficient context: what it does, what the PDF contains, and the output path. It omits edge-case behaviors like file overwrite, but for initial selection and correct invocation of a file-writing operation, this is reasonably complete.

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?

The input schema already covers 100% of parameters with detailed descriptions: 'number' is specified as returned by invoice_create, and 'out_path' includes defaults, content details, and a .pdf requirement. The description only echoes the content list and adds no parameter-specific nuance beyond what the schema provides. With complete schema coverage, a baseline of 3 is appropriate.

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 states a specific action ('write one stored invoice as an A4 PDF') and the resource (stored invoice), and enumerates the PDF content (issuer, BILL TO, dates, items, taxes, totals). This clearly distinguishes it from sibling tools like invoice_get or invoice_create, which handle data retrieval and creation rather than file generation.

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 description explicitly states when to call the tool ('to write one stored invoice as an A4 PDF'), providing clear context. It does not mention alternatives or exclusions, but the primary purpose is unambiguous enough that an agent would not confuse it with other invoice-related tools.

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

Deploy Server

Other Tools