Skip to main content
Glama

HTML or web page to PDF

html_to_pdf
Read-onlyIdempotent

Turn HTML you write (an invoice, report, letter or certificate) or a public web page into a print-quality PDF, rendered by Chrome with backgrounds and CSS. Use when you need to hand a person a polished, printable document. Send {html} or {url}; optional format (A4, Letter, A3, A5, Legal) and landscape. Returns the PDF. Errors: 400 missing input or private URL, 413 HTML over 2 MB. Price: $0.01 USDC per call (x402).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic page to print. Provide html OR url.
htmlNoHTML to render. Provide html OR url.
formatNo
landscapeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations (which only cover readOnly/idempotent/openWorld/destructive) by disclosing the rendering engine, the 2 MB HTML ceiling with the 413 error, 400 on missing input or private URL, and the $0.01 USDC x402 payment requirement. Those are exactly the operational facts an agent cannot infer from the schema or hints.

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?

Front-loads what the tool produces and when to use it before invocation details, errors and pricing, with essentially no filler. The final sentence is a dense catch-all bundling return value, two error codes and a price, which slightly hurts scannability.

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?

For a 4-param tool with no output schema, the description covers the return value ('Returns the PDF'), input combinations, the enum space, failure modes and cost. Nothing an agent needs before invoking it is missing.

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 only 50%, with format and landscape undocumented in the schema, but the description compensates by enumerating the accepted formats (A4, Letter, A3, A5, Legal) and confirming landscape plus the html-XOR-url rule. It adds real meaning over the structured fields, though defaults and the XOR constraint's enforcement are left implied.

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+resource (HTML/web page → print-quality PDF) and concretely names the output artifact and renderer ('rendered by Chrome with backgrounds and CSS'), which implicitly separates it from siblings like webpage_to_markdown or screenshot_webpage. It never names an alternative sibling explicitly, so it stops short of a 5.

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?

Gives a clear use condition: 'Use when you need to hand a person a polished, printable document,' plus the intake shape ('Send {html} or {url}'). There is no explicit when-not or named alternative for the case where markup or a screenshot is wanted instead, so it is context without exclusions.

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