Skip to main content
Glama

Render a PDF

render_pdf

Convert HTML or a public URL into a PDF, with signed receipt and quota details returned. Choose either HTML or URL as input and optionally save the file locally.

Instructions

Turn HTML or a public URL into a PDF with pagenull. Send exactly one of html or url. Returns the PDF (base64, or written to save_to), its signed receipt, warnings and quota. Nothing is stored by pagenull.

Input Schema

NameRequiredDescriptionDefault
urlNoA public http(s) URL to load. Private and internal addresses are refused.
htmlNoThe HTML document to render (up to 5 MB).
testNoTest render: watermarked, free, not counted against the quota.
formatNoPaper size. Default A4.
marginNo
optionsNoAny other option from https://pagenull.dev/docs/api (e.g. waitFor, timeoutMs, scale, headerHtml). Checked by the API.
save_toNoWrite the file to this path on this machine instead of returning it as base64. The folder must exist. Use it for large files.
filenameNoFile name for the Content-Disposition header.
landscapeNo
overwriteNoReplace the file at save_to if it already exists. Default false.
pageNumbersNotrue for "Page {page} of {pages}", or your own text with {page} and {pages}.
printBackgroundNoPrint background colours and images. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does add real behavioral context: statelessness ('Nothing is stored by pagenull'), the returned artifacts (PDF, signed receipt, warnings, quota), and the base64-vs-save_to choice. It omits auth requirements, rate limits, quota magnitude, and failure behavior, leaving meaningful gaps for a tool whose result is a file.

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?

Four short sentences, front-loaded with the core purpose and immediately followed by the key calling constraint. The phrasing 'with pagenull' and the sentence fragment 'Returns the PDF..., its signed receipt, warnings and quota' are slightly compressed but nothing is redundant.

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 12-parameter tool with nested margin/options objects and no output schema, the description covers the essential unknowns: return form, side artifacts, file-writing behavior, and statelessness. What remains missing — auth, quota size, and the unpinned options passthrough — is documented in the schema or externally, so the description is largely sufficient.

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 already 83%, so the schema documents most parameters. The description still adds genuine meaning beyond it by stating the mutual-exclusivity rule between html and url (the schema does not enforce a oneOf) and by explaining that save_to replaces base64 output with a written file. Landscape, margins, and options rely entirely on 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?

The description names a specific verb and resource ('Turn HTML or a public URL into a PDF'), so an agent can immediately tell this is an HTML/URL-to-PDF renderer rather than a template renderer or screenshot tool. It does not, however, explicitly distinguish itself from siblings like render_template or screenshot, which plausibly overlap.

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?

Usage is implied by the input constraint 'Send exactly one of html or url,' which tells the agent how to call it but not when to prefer it over render_template or screenshot. No explicit when-not guidance or mention of alternatives appears anywhere in the description.

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