Merge PDFs
merge_pdfsUse this when the user wants to merge PDF files, combine PDFs into one, join PDF pages, reorder PDF pages, take only some pages of each PDF, delete pages from a PDF, or rotate PDF pages. Takes 1 to 20 attached PDFs in attach order and an optional list of parts (file number, page ranges like "1-3, 7, 10-end", pages to skip, rotation 90/180/270), and returns one new PDF with the page plan and a check that the output page count, order, sizes and rotation match the plan. With one file, it can delete, reorder or rotate pages. Does not open password-protected PDFs, does not keep form fields editable (they are flattened), and does not edit text. Do not use for splitting one PDF into several files (use split_pdf).
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": {
"files": "<files>"
},
"name": "merge_pdfs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | The PDFs to merge, in order, e.g. cover.pdf, report.pdf, appendix.pdf. | |
| parts | No | Optional page plan, in output order, e.g. [{"file":2,"pages":"1-3"},{"file":1,"pages":"all","rotate":90}]. Default: all pages of all files in attach order. | |
| output_name | No | File name for the result, e.g. contract-signed-set.pdf. Default: merged.pdf. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | Yes | ||
| check | Yes | ||
| files | Yes | ||
| notes | Yes | ||
| downloads | Yes | ||
| plan_count | No | ||
| output_name | Yes | ||
| output_pages | Yes | ||
| output_size_kb | Yes | ||
| expires_in_hours | Yes |