Skip to main content
Glama

mint utilities

HTML to PDF

html_to_pdf
Read-onlyIdempotent

Turn an HTML document into a print-ready PDF with page size, margins, orientation and page-numbered header and footer. Cost: 3 credits per call. Output: a file (application/pdf) returned inline, at most 1 MiB. The PDF document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
htmlYesThe HTML document or fragment (UTF-8, up to 2 MB). JavaScript is not executed.
scaleNoRendering scale
formatNoPaper sizeA4
landscapeNo
margin_mmNoPage margin on all sides, millimetres
footer_textNoPlain-text page footer; {page} and {pages} are replaced
header_textNoPlain-text page header; {page} and {pages} are replaced
print_backgroundNoPrint CSS backgrounds and colours

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower. The description adds real value beyond them: a per-call cost of 3 credits, the return medium (inline application/pdf), and a hard output cap of 1 MiB. It does not note failure modes or what happens on oversized output, but this is solid extra context.

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?

Two dense, front-loaded sentences that open with the action and immediately follow with cost and output constraints. The trailing fragment 'The PDF document' is dangling and adds nothing, the only real waste.

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?

With no output schema, the description correctly fills that gap by stating the return type, delivery mode and size ceiling, and it discloses metered cost. An 8-parameter tool with 88% schema coverage plus this prose is adequately specified, though error/limit behavior on oversized inputs is unstated.

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 coverage is high (88%), so a baseline of 3 applies, but the description maps its prose onto parameters by naming page size, margins, orientation and page-numbered header/footer, matching format, margin_mm, landscape and header_text/footer_text. It gives no units or defaults, but semantics are largely carried by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (HTML document -> print-ready PDF) and enumerates configurable aspects (page size, margins, orientation, header/footer). It is clearly distinguishable from pdf_merge, pdf_split and html_to_image by input and output type, though it never names a sibling to contrast with.

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

Usage Guidelines3/5

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

The purpose makes usage largely self-evident (choose this when you have HTML and want a PDF), but there is no explicit when-to-use vs html_to_image/screenshot guidance and no exclusions or prerequisites stated. Usage is implied rather than directed.

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