Run a PDF tool
pdf_toolRun a PDF tool on files at URLs, or on local files uploaded with create_upload (import_ids), and return a download link: compress, merge, split, rotate, extract or remove pages, protect, unlock, add a watermark or page numbers, redact words, crop, flatten, grayscale, PDF/A, repair, compare two versions, overlay a letterhead, images to PDF, and more. Call list_pdf_tools first for the tool names and their options. Most tools take one PDF; merge, images-to-pdf, overlay and compare take several, in order. Runs against your account and counts toward your quota.
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": {
"tool": "<tool>"
},
"name": "pdf_tool"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | Tool name from list_pdf_tools, e.g. "compress", "merge", "redact". | |
| options | No | The tool's options by name, from list_pdf_tools — e.g. {"level": "extreme"} for compress, {"pages": "1-3"} for extract-pages, {"terms": "John Smith"} for redact. | |
| sources | No | URLs of the input files, fetched by our server, in order. One for most tools; two or more for merge, images-to-pdf, overlay (document, then overlay) and compare (original, then new version). | |
| import_ids | No | Instead of sources, for local files: the import_ids from create_upload, in the same order. Waits for files that are still being sent. |