Delete pages from PDF
pdf_delete_pagesRemove the listed pages from a PDF and return the remaining pages in their original order. Use this to drop a cover, blank or sensitive pages; use pdf_extract_pages when it is easier to name the pages to keep. Returns the result inline as an application/pdf resource; the source is never modified. Deleting every page fails with no_pages_left.
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>",
"pages": "<pages>"
},
"name": "pdf_delete_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | 1-based pages to REMOVE, e.g. "2,4-6,9-" | |
| 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: an https:// URL or a data:application/pdf;base64,… URI (this hosted server cannot read local file paths). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | Size of the produced PDF in bytes | |
| resource_uri | No | pdfops:// uri of the inline application/pdf resource |