Skip to main content
Glama

capture_pdf

Turn a URL into a print-ready PDF using headless Chromium. Renders full-page content, supports authenticated pages, and blocks SSRF threats for safe conversion.

Instructions

Convert a URL to a PDF document using headless Chromium. Renders the full page (including lazy-loaded content) or viewport to a print-quality PDF. Uses system Chrome profile when available for authenticated pages. SSRF protection enabled by default (blocks private IPs, localhost). Supports custom viewport for responsive PDFs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to convert to PDF (http/https). Must pass SSRF validation: no private IPs, localhost, or DNS-rebinding. Redirects are validated.
widthNoViewport width in pixels (320-3840) for responsive rendering.
heightNoViewport height in pixels (240-4096) for responsive rendering.
outputNoOutput filename (default: auto-generated as 'pdf-<timestamp>.pdf'). Must end in .pdf.
fullPageNoInclude all page content (true) or only viewport (false). Full page prints the entire scrollable document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.3.4
    • changedInput schema / properties / fullPage / description
      Previous value: -"Include all content"New value: +"Include all page content (true) or only viewport (false). Full page prints the entire scrollable document."
    • changedInput schema / properties / height / description
      Previous value: -"Viewport height"New value: +"Viewport height in pixels (240-4096) for responsive rendering."
    • changedInput schema / properties / output / description
      Previous value: -"Output filename (default: auto-generated)"New value: +"Output filename (default: auto-generated as 'pdf-<timestamp>.pdf'). Must end in .pdf."
    • changedInput schema / properties / url / description
      Previous value: -"URL to convert to PDF"New value: +"URL to convert to PDF (http/https). Must pass SSRF validation: no private IPs, localhost, or DNS-rebinding. Redirects are validated."
    • changedInput schema / properties / width / description
      Previous value: -"Viewport width"New value: +"Viewport width in pixels (320-3840) for responsive rendering."
  2. First observedv2.3.2

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: it discloses headless Chromium usage, lazy-loaded content handling, full-page vs viewport behavior, Chrome profile authentication, and SSRF protections. This goes substantially beyond what the schema alone conveys.

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?

The description is four compact sentences with no filler. It front-loads the core purpose, then adds behavioral details that matter for invocation, such as SSRF restrictions and authenticated-page support. Every sentence earns its place.

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 5-parameter tool with no output schema and no annotations, the description covers the key invocation-relevant aspects: conversion mechanism, rendering mode, authentication, and network restrictions. The main gap is that it does not describe the return value or output location, which is more impactful because no output schema exists.

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 100%, so the parameters are already well documented in the schema. The description reinforces concepts like full-page vs viewport and custom viewport, but adds no new parameter-level meaning that the schema does not already provide.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Convert a URL to a PDF document using headless Chromium.' It clearly identifies the output format and distinguishes itself from sibling capture tools like capture_markdown or capture_html by focusing on PDF generation.

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 the tool's use case—producing print-quality PDFs from URLs—and mentions useful contexts like authenticated pages via the system Chrome profile. However, it does not explicitly state when to choose this over alternatives like capture_html or capture_to_document, nor does it mention exclusions.

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