Skip to main content
Glama

Cofferdock

HTML to PDF

html_to_pdf
Idempotent

HTML to PDF. Renders HTML into a PDF (invoices, reports, tickets, contracts). Same rendering engine as /capture: inline CSS, web fonts and images allowed, no JavaScript. Send either html, or template + data (the "invoice" template works well as a PDF).

Costs 1 credit per call.

Returns a temporary download link (valid 15 minutes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoTexts for the template, e.g. { "name": "Jane Doe", "course": "n8n basics" } for "certificate". Plain text only: everything is escaped. Fields you leave out keep the example text.
htmlNoThe HTML to render (max 5 MB). Required unless you use template.
langNoLanguage of the example texts of the template.en
scaleNoContent scale factor (0.1-2). Default 1; use a value below 1 to fit more on each page.
formatNoPaper size.A4
marginNoMargin in millimetres, same on all four sides.
templateNoUse one of our ready-made designs instead of sending html. Fields, example texts and sizes: https://cofferdock.com/templates.json
landscapeNotrue = landscape page, false (default) = portrait.
print_backgroundNoPrint background colours and images.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses important behavioral traits beyond annotations: no JavaScript support, inline CSS/web fonts/images allowed, cost of 1 credit per call, and a temporary download link valid for 15 minutes. The idempotentHint annotation is consistent with the description's stateless rendering behavior. It doesn't mention failure modes or rate limits, but the disclosed constraints are valuable for an agent.

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 compact and front-loaded: it states the core purpose first, then constraints, then usage modes, then cost and output. Every sentence earns its place, and the structure guides the agent from what to how to what to expect.

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?

For a tool with 9 parameters, 100% schema coverage, and no output schema, the description covers the key contextual gaps: rendering limitations, cost, and download link expiry. It doesn't explain the return format in detail, but the 'temporary download link' statement is sufficient for an agent to know what to expect. The template URL is also provided for the template parameter.

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 9 parameters. The description adds a few useful semantics: the 'invoice' template works well as a PDF, and the data parameter is plain text with escaping. However, it doesn't add much beyond the schema's parameter descriptions, so the baseline 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 clearly states the tool converts HTML to PDF, lists concrete use cases (invoices, reports, tickets, contracts), and distinguishes it from the sibling html_to_image by noting the same rendering engine as /capture. The verb 'renders' plus the resource 'HTML into a PDF' makes the purpose unambiguous.

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 gives clear context on when to use it (rendering HTML to PDF) and mentions the alternative template mode. It doesn't explicitly name sibling alternatives like html_to_image or images_to_pdf, but the use cases and rendering constraints imply when this tool is appropriate. It also notes the 'invoice' template works well as a PDF, which is a helpful usage hint.

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