extract_pages
Extract selected pages from a PDF file into a new document. Specify page numbers or ranges to create a custom PDF with only the pages you need.
Instructions
Extract specific pages from PDF to a new file.
Args:
file_path: Path to the source PDF file
pages: Page range (e.g., "1,3,5-7" for pages 1, 3, and 5 to 7)
output_file: Output filename (optional, auto-generated if not provided)
output_dir: Output directory (defaults to source file directory)
Returns:
JSON string with extraction results and output file information
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": {
"file_path": "<file_path>",
"pages": "<pages>"
},
"name": "extract_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| pages | Yes | ||
| output_file | No | ||
| output_dir | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |