Delete pages
delete_pagesRemove selected pages from a PDF and save the remaining pages as a new -trimmed file, leaving the original unchanged.
Instructions
Removes the selected pages and keeps the rest in order, named with -trimmed. At least one page must remain. Writes the result as a new file next to the input (or to output_path) and never replaces an existing file; the input is left unchanged.
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": {
"path": "<path>",
"pages": "<pages>"
},
"name": "delete_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute path to a PDF file, or one starting with ~/. | |
| pages | Yes | Pages to remove, such as "2", "1-3, 5" or "4-end". Commas separate parts. | |
| output_path | No | Optional absolute path for the new PDF, ending in .pdf. It must not exist yet. By default the result goes next to the input. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | Pages in the new PDF | |
| output_path | Yes | Where the new PDF was written |