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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "capture_pdf"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to convert to PDF (http/https). Must pass SSRF validation: no private IPs, localhost, or DNS-rebinding. Redirects are validated. | |
| width | No | Viewport width in pixels (320-3840) for responsive rendering. | |
| height | No | Viewport height in pixels (240-4096) for responsive rendering. | |
| output | No | Output filename (default: auto-generated as 'pdf-<timestamp>.pdf'). Must end in .pdf. | |
| fullPage | No | Include all page content (true) or only viewport (false). Full page prints the entire scrollable document. |