Split PDF into parts
pdf_splitSplit a PDF into multiple PDFs by explicit page ranges or fixed-size chunks, returning each part inline or saving them to an output directory.
Instructions
Split one PDF into several PDFs, either by explicit ranges (each comma group becomes one part: "1-2,3-5" gives two parts) or into fixed-size chunks (every=2 on 5 pages gives 1-2, 3-4, 5). Give exactly one of ranges or every. With output_dir the parts are written there as part-1.pdf, part-2.pdf, …; otherwise each part comes back inline as an application/pdf resource. Either way you also get a structured parts list (pages, page_count, bytes, and output_path or resource_uri). Existing part-N.pdf files with those names are overwritten, and part-N.pdf files from earlier runs in that directory are left as they are; the source is never modified. Limited to 100 parts and about 4 MB of total output; use pdf_extract_pages for a single range.
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": {
"pdf_path": "<pdf_path>"
},
"name": "pdf_split"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| every | No | Chunk size in pages; the last part may be shorter | |
| ranges | No | 1-based page spec; each comma group becomes one part, e.g. "1-2,3-5" | |
| password | No | Password to open the input, only needed for a user-password PDF (owner-locked files with an empty user password open without it). | |
| pdf_path | Yes | PDF source: a path to a .pdf file inside the allowed directories (PDFOPS_ROOT, default the working directory), an https:// URL, or a data:application/pdf;base64,… URI. Use a URL or data URI when this server runs remotely (Smithery, hosted gateways) where local paths do not exist. | |
| output_dir | No | Path of an existing directory inside the allowed directories (PDFOPS_ROOT, default the working directory) to write part-1.pdf, part-2.pdf, … into. Omit when running remotely: the parts are then returned inline as application/pdf resources. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of parts produced | |
| parts | Yes |