extract_pdf_pages
Extract selected pages from a PDF into a new document. Specify pages as a list or range, like '1,3,5-7'.
Instructions
Extract a subset of pages from a PDF into a new PDF. Specify pages as a list or range, e.g. "1,3,5-7".
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": {
"input_file": "<input_file>",
"pages": "<pages>"
},
"name": "extract_pdf_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | Pages to extract, e.g. "1,3,5-7". Required. | |
| input_file | Yes | Path to the PDF file to extract pages from. | |
| output_path | No | Optional output path. If it ends with the expected extension, the file is written there. If it is a directory, the file is placed inside with a timestamped name. Defaults to the same directory as the first input. |