sort_pages
Reorder pages in a PDF by specifying a custom page order, such as [3,1,2] to move page 3 to the front.
Instructions
Reorder pages in a PDF by custom order. E.g. order [3,1,2] puts page 3 first.
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": "<file>",
"order": "<order>"
},
"name": "sort_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to the PDF file | |
| order | Yes | New page order as 1-based indices, e.g. [3,1,2] | |
| output_name | No | Output file path (defaults to same dir with suffix) |