rearrange_pages
Reorder, duplicate, or reverse PDF pages using a custom page order sequence; unlisted pages are dropped by default, and a password unlocks files that forbid document assembly.
Instructions
Reorder/duplicate/reverse pages. page_order e.g. "3,1,2", "5-1" (reverse), "last,1-4".
Unlisted pages are dropped unless append_unlisted=true. Pages may repeat to duplicate. Needs the owner password if the PDF forbids document assembly.
Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.
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_path": "<input_path>",
"page_order": "<page_order>"
},
"name": "rearrange_pages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| password | No | ||
| overwrite | No | ||
| input_path | Yes | ||
| page_order | Yes | ||
| output_path | No | ||
| append_unlisted | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order | Yes | ||
| pages | Yes | ||
| output | Yes | ||
| password_protected | Yes | ||
| user_password_changed | Yes | ||
| permissions_restricted | Yes |