interleave_pdfs
Combine front and back scans of a double-sided document into one correctly ordered PDF, reversing back pages by default to fix single-sided scanner output.
Instructions
Combine the fronts and backs of a double-sided document scanned on a single-sided scanner into one PDF: front 1, back 1, front 2, back 2, ... Turning the stack over to scan the backs puts them last page first, so they are reversed; pass reverse_backs=false if they were scanned in order. The backs must have as many pages as the fronts, or one fewer. A scan that forbids document assembly needs its owner password.
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": {
"front_path": "<front_path>",
"back_path": "<back_path>",
"output_path": "<output_path>"
},
"name": "interleave_pdfs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| back_path | Yes | ||
| overwrite | No | ||
| front_path | Yes | ||
| output_path | Yes | ||
| back_password | No | ||
| reverse_backs | No | ||
| front_password | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backs | Yes | ||
| pages | Yes | ||
| fronts | Yes | ||
| output | Yes | ||
| password_protected | Yes | ||
| user_password_changed | Yes | ||
| permissions_restricted | Yes |