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). Always include that link in your reply so the user can open or download the file.

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.7/5.0
Behavior5/5

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

Beyond annotations (idempotent, non-destructive), the description discloses additional behaviors: 'Costs 1 credit per call', 'Returns a temporary download link (valid 15 minutes)', and instructs the agent to always include the link in the reply. It also specifies rendering constraints (no JavaScript, inline CSS, web fonts, images allowed) and template fallback behavior. This is substantively more than annotations cover.

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 three sentences: purpose, rendering engine limitations, template option, cost, and output link instructions. It is concise, front-loads the core function, and every sentence serves a purpose without fluff.

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?

With 9 parameters, no output schema, and nested objects, the description is comprehensive: it explains how to choose between html and template, mentions the templates.json link for details, states the credit cost, and clarifies the response format (temporary link with validity). It ensures an agent can call the tool correctly end-to-end.

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

Parameters4/5

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

Schema descriptions cover 100% of the 9 parameters, so the baseline is 3. The description adds value by clarifying the data parameter escaping ('Plain text only: everything is escaped'), template field fallback ('Fields you leave out keep the example text'), and scale usage ('use a value below 1 to fit more on each page'). These enrich the schema without redundancy.

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 verb 'renders' and resource 'HTML into PDF' with explicit use cases (invoices, reports, tickets, contracts). It distinguishes from siblings like html_to_image or images_to_pdf by mentioning the rendering engine and template option, making the scope precise.

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 explicit usage options: 'Send either html, or template + data' and highlights the invoice template as suitable for PDF. It also notes the same rendering engine as /capture, but does not explicitly contrast with siblings like html_to_image or images_to_pdf, so some inference is required. It provides clear context but lacks direct alternatives.

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