Skip to main content
Glama

render_pdf

Cut a rendered page into pages and package as PDF, PNGs, PPTX or DOCX. Print mode (no selector) paginates the document into fixed-height pages (default 794x1123, A4 @96dpi), breaking at top-level block boundaries — no half-cut text where a break can land on a block edge. Slides mode (selector set) makes one page per match, sized to that element — generate an HTML deck with one .slide per page and each becomes a deck page. format "pdf" (default) returns base64 image-based PDF; "png" returns one base64 PNG per page in pages_base64; "pptx" returns a base64 PPTX (one slide per page, deck-sized to the largest page); "docx" returns a base64 DOCX (one page-sized section per page, each section keeps its own height). Returns page count and packaging.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesPage URL to cut into pages.
widthNoPage width in CSS pixels. Default 794 (A4 @96dpi).
formatNoOutput format: "pdf" (default), "png" (one base64 PNG per page), "pptx" (one slide per page, image-based), "pptx-native" (editable: element-level DrawingML — real text runs, gradient shapes, image parts; requires `selector`), or "docx" (one page-sized section per page).pdf
heightNoPage height in CSS pixels — print pagination only. Default 1123.
selectorNoCSS selector; present → slides mode (one page per match, sized to the element). Absent → print mode (fixed-height pages at block boundaries).
max_pagesNoSafety cap on emitted pages. Default 50.
use_proxyNoRoute through proxy (for blocked foreign sites)
jpeg_qualityNoJPEG quality for PDF page embedding (1-100). Default 90.
tls_fingerprintNoTLS fingerprint override (stealth mode only)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

The description discloses several non-obvious behaviors: pagination breaks at top-level block boundaries to avoid half-cut text, slides are sized to the matched element, PPTX is deck-sized to the largest page, DOCX sections keep their own height, and PDF is image-based. It also mentions the safety cap (max_pages) implicitly through the schema. The annotations only provide a title, so the description carries the behavioral burden and does so well, though it doesn't explicitly state that the operation is read-only or mention rate limits.

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?

The description is dense but well-organized: it front-loads the core purpose, then explains modes, then formats, then return value. Every sentence adds information. It's longer than ideal but the complexity of the tool (two modes, five formats, pagination rules) justifies the length. A slight deduction for the run-on structure in the format list, which could be broken into clearer sentences.

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 tool with 9 parameters, no output schema, and only a title annotation, the description covers the essential decision points: mode selection, format behavior, pagination rules, and return shape (base64 strings, page count). It doesn't explicitly describe the full return object structure (e.g., field names beyond pages_base64), but it names the key fields and the page count, which is sufficient for an agent to call it correctly. The missing piece is a note about what happens when max_pages is exceeded.

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 description coverage is 100%, so the schema already documents all 9 parameters. The description adds value by explaining the semantic difference between print and slides mode (selector presence), the meaning of format variants (pptx-native requires selector), and the pagination behavior tied to width/height. It doesn't repeat every parameter but clarifies the ones that affect behavior, which is appropriate given the high schema coverage.

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 ('Cut a rendered page into pages') and names the exact resource and output formats (PDF, PNGs, PPTX, DOCX). It clearly distinguishes the two operating modes (print vs slides) and explains the difference via the selector parameter, which separates it from sibling tools like render_markdown or render_video.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly explains when to use print mode (no selector) vs slides mode (selector set), and even gives a concrete use case ('generate an HTML deck with one .slide per page'). It also documents format-specific behavior (pptx-native requires selector), giving an agent clear decision criteria for choosing the right mode and format.

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.