Skip to main content
Glama

Render HTML or a page to PDF

html_to_pdf
Read-only

Render HTML, Markdown or a URL to a PDF in headless Chromium and return a download link. Uses 1 credit from the user's Shotlane account.

Input Schema

NameRequiredDescriptionDefault
urlNoAlternatively, a public page URL to print.
htmlNoFull HTML document to render.
paperNoA4
marginNoPage margin on all sides, e.g. 15mm or 0.5in. Default 0.
markdownNoAlternatively, Markdown; rendered with a clean document style.
landscapeNo
page_numbersNoAdd a '1 / N' page number footer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / margin
      Added value: +{
      +  "description": "Page margin on all sides, e.g. 15mm or 0.5in. Default 0.",
      +  "type": "string"
      +}
    • addedInput schema / properties / markdown
      Added value: +{
      +  "description": "Alternatively, Markdown; rendered with a clean document style.",
      +  "type": "string"
      +}
    • addedInput schema / properties / page_numbers
      Added value: +{
      +  "default": false,
      +  "description": "Add a '1 / N' page number footer.",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true, destructiveHint=false and openWorldHint=true, so safety is covered. The description adds genuinely new behavioral context beyond those annotations: rendering happens in headless Chromium, the result is a download link (not inline bytes), and the call consumes 1 credit from the user's account. It stops short of describing failure handling or rate/credit limits for repeated calls.

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 sentences, zero filler, with the core capability front-loaded and the credit cost as a trailing caveat. Every clause carries information an agent needs.

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 7-parameter tool with 71% schema coverage, the description covers the essential contract: what goes in, where rendering happens, and what comes back (a download link), which compensates for the missing output schema. The main remaining gap is the mutual exclusivity of url/html/markdown and any constraints when more than one is supplied.

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 71%, so most parameters are already documented and the baseline of 3 applies. The description restates the three input modes (HTML, Markdown, URL) but adds no new semantics: it never says they are mutually exclusive, nor does it clarify paper/margin/landscape/page_numbers behavior beyond the schema text.

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 output resource: render HTML, Markdown or a URL into a PDF via headless Chromium, returning a download link. That is far more informative than the title alone and is clearly distinguishable from screenshot (image output) and read_page (content extraction), though it never explicitly names those siblings as alternatives.

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 only implied: an agent can infer 'use this when you need a PDF', but there is no statement of when to prefer this over screenshot or read_page, nor any exclusions or prerequisites. The 'Alternatively' framing in the schema hints the three input modes are mutually exclusive, but the description does not confirm or route between them.

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