Skip to main content
Glama

Convert a web page or HTML to PDF

generate_pdf

Convert a web page URL or HTML document to PDF and receive a hosted PDF URL for download or sharing.

Instructions

Render a web page (url) or an HTML document (html) to a PDF. Returns the hosted PDF URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPage to capture (http:// or https://)
htmlNoHTML document to render instead of a URL
adblockNoBlock ads
printedNoUse the print stylesheet. Default true
wait_msNoExtra wait before capturing, in ms
light_modeNoForce light or dark color scheme
viewport_widthNoViewport width in pixels. Default 1920
viewport_heightNoViewport height in pixels. Default 1080
block_cookie_bannerNoHide cookie consent banners

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It usefully discloses the return value ('hosted PDF URL'), which no output schema covers, but says nothing about render timeouts, async/polling behavior, auth or rate limits for a 9-parameter rendering tool.

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?

Two short sentences, zero waste, with the action and input modes front-loaded and the return value folded into the second sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Return format is covered even without an output schema, but with 0 required parameters the description should resolve which of url/html is expected and whether they are mutually exclusive; it only implies this. No annotation coverage exists to fill the behavioral gap for a fairly rich rendering tool.

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 coverage is 100%, so all nine parameters including adblock, printed, wait_ms and viewport dimensions are already documented in the schema; baseline 3 applies. The description only names the url and html params and adds the 'instead of' exclusivity hint, which is marginal added value.

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 (Render) and resource (web page/HTML → PDF), and the two input modes are named directly. The PDF output distinguishes it from screenshot_url/screenshot_html, but the siblings are never named, so differentiation is inferred rather than stated.

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 description implies usage through the '(url)' and '(html)' cues and the phrase 'instead of a URL', which hints at mutual exclusivity. However, it never states when to choose PDF generation over the screenshot siblings, nor what happens if both or neither of the two input params are supplied.

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

Deploy Server

Other Tools