Skip to main content
Glama

Render a PDF

render_pdf
Read-onlyIdempotent

Render a public web page (url) or raw HTML (html) to PDF. A url prints as it looks on a desktop screen and is scrolled through first, so content that loads or appears on scroll is in the PDF. Returns the PDF as an embedded resource.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "render_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic http(s) URL to print
htmlNoRaw HTML (max 1 MB); use instead of url
delayNoExtra wait after load, ms
mediaNoscreen: the page as it looks on a desktop screen, scaled to fit the paper (best for landing and pricing pages). print: the page's print styles at the paper width, like a browser's Print dialog (best for articles and documents). Default: screen for url, print for html.
widthNoLayout width in CSS px, scaled to fit the paper. Default: 1280 with media screen, the paper width with media print.
formatNoA4
marginNoCSS length for all sides, e.g. 10mm, 0.5in10mm
scrollNoScroll through the page before printing. Default true for url, false for html.
landscapeNo
print_backgroundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / delay
      Added value: +{
      +  "default": 0,
      +  "description": "Extra wait after load, ms",
      +  "maximum": 10000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / media
      Added value: +{
      +  "description": "screen: the page as it looks on a desktop screen, scaled to fit the paper (best for landing and pricing pages). print: the page's print styles at the paper width, like a browser's Print dialog (best for articles and documents). Default: screen for url, print for html.",
      +  "enum": [
      +    "print",
      +    "screen"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / scroll
      Added value: +{
      +  "description": "Scroll through the page before printing. Default true for url, false for html.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / url / description
      Added value: +"Public http(s) URL to print"
    • addedInput schema / properties / width
      Added value: +{
      +  "description": "Layout width in CSS px, scaled to fit the paper. Default: 1280 with media screen, the paper width with media print.",
      +  "maximum": 3840,
      +  "minimum": 320,
      +  "type": "integer"
      +}
  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 declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely new behavior: a url renders in desktop-screen layout and is scrolled first so lazy content appears, and the output is an embedded PDF resource. It does not mention failure modes for slow or blocked pages, but the added context is substantive.

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?

Three front-loaded sentences, no filler, with the input modes first and the return value last. Every sentence carries information an agent cannot get from the schema alone (scroll-first rendering, embedded resource output).

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?

Given ten optional parameters and no output schema, the description correctly explains what comes back and one important rendering quirk. It leaves unstated that exactly one of url/html is needed and offers no guidance on the tradeoff against take_screenshot, which are minor gaps for a tool with rich schema coverage.

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 description coverage is 70%, so the schema mostly documents the ten parameters, including media, width and scroll defaults. The description reinforces only the url/media/scroll interaction ('prints as it looks on a desktop screen and is scrolled through first') and says nothing about delay, format, margin, landscape or print_background, so it adds modest meaning beyond 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 — render a web page or raw HTML to PDF — and names both input modes with the mutual-exclusion rule ('use instead of url'). It does not distinguish itself from the siblings take_screenshot or generate_og_image, so an agent must infer that PDF output differs from an image capture.

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 url-vs-html choice is clear, and the note that a url is scrolled through first implies when the URL path is preferable for lazy-loading pages. There is no explicit when-to-use or when-not-to-use against alternatives such as take_screenshot, so routing is left partly implicit.

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