Merge PDFs
pdf_mergeMerge multiple PDFs into one file in the order given. Writes the combined PDF to an output path, or returns it as a download when no path is specified.
Instructions
Merge two or more PDFs into one, in the order given, and save or return the result. Source files are read only and never modified; an existing file at output_path is overwritten. Returns the merged PDF written to output_path, or inline as an application/pdf resource when output_path is omitted. This tool only concatenates whole documents: it does not reorder, rotate or delete pages within them, and it does not fill forms — use pdf_fill for a fillable form and pdf_invoice to build a document from data. An unreadable or rejected input fails with an error and writes no file, so a partial merge is never left behind.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pdf_paths | Yes | In order, each a PDF source: an absolute file path, an https:// URL, or a data:application/pdf;base64,… URI. Use a URL or data URI when this server runs remotely (Smithery, hosted gateways) where local paths do not exist. | |
| output_path | No | Absolute path to write the result. Omit when running remotely: the PDF is then returned inline as an application/pdf resource for the client to save. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | Size of the produced PDF in bytes | |
| output_path | No | Absolute path written, when output_path was supplied | |
| resource_uri | No | pdfops:// uri of the inline application/pdf resource, when output_path was omitted |