Overview
Merging uses the pdf-lib library. A new, empty document is created, and for each input in order every page is copied into it, bringing the page's content and the fonts and images it uses. Only pages are copied: document-level bookmarks and the source files' metadata are not carried into the result.
Input arrives one of two ways. A multipart request is read file by file in form order, and each part must contain a `%PDF-` header in its first kilobyte. Otherwise `urls` is read as a JSON array or a comma-separated string of http(s) links, downloaded one after another with a 10 MB limit each and a 20-second timeout; links must point to public hosts. Fewer than 2 or more than 10 PDFs returns 400. A file over 10 MB, a combined size over 25 MB, or a merge that would pass 500 pages returns 413. A password-protected file returns 400 naming that file, and nothing is merged.
`fileCount` is the number of inputs, `pageCount` the pages in the result, and `size` the byte length of the merged file. `pdfName` is a random file name, `downloadURL` a signed link to the stored copy, and `expires` the moment the link stops working, as Unix time in milliseconds, two days after the call. The PDF is not in the response body, so download it before then.
`sources` lists each input with its 1-based `index`, `name`, `pageCount`, and the `startPage` and `endPage` it occupies in the merged file. For URL inputs, `name` is the last segment of the URL path. On the Free plan `sources` is null.
The tool
Once your client is connected to the VerveKit server, this appears in its tool list as PDFMerge. It is read-only and open-world — it fetches and never mutates anything on your side — so most clients call it without asking you to confirm.
{
"name": "PDFMerge",
"arguments": {}
}Connecting
One server URL covers every skill in the catalog, including this one. Authorization is OAuth: the client opens a browser once, and there is no key to paste into a config file.
{
"mcpServers": {
"vervekit": {
"url": "https://api.vervekit.com/v1/mcp"
}
}
}https://api.vervekit.com/v1/mcpPer-client setup — Claude, Cursor, VS Code, ChatGPT — is on the MCP setup page.
Arguments
These are the properties on the tool's inputSchema, so a well-behaved client validates them before the call is made. Premium arguments are accepted on every plan but only take effect on plans that include them.
| Argument | Type | Description |
|---|---|---|
urlsOptional | array | A JSON array of 2 to 10 public PDF URLs, merged in order. Or upload the PDFs as multipart files instead |
What the model gets back
The result carries a structuredContent object matching the tool's declared outputSchema, so a client reads fields without parsing prose. status is "ok" and error is null on success; a null field means the value was not available for that input, not that the call failed.
{
"status": "ok",
"error": null,
"data": {
"pdfName": "a356acc9-c44f-4363-9cda-14ed160d5f5d.pdf",
"fileCount": 2,
"pageCount": 5,
"size": 13539,
"expires": 1792230036453,
"downloadURL": "https://storage.googleapis.com/apiverve/APIData/pdfmerge/a356acc9-c44f-4363-9cda-14ed160d5f5d.pdf?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1792230036&Signature=R5%2B9%2FIKgsCiWQ7ibAS4Z%2B%2FLpYbNYc7hbAQGI%2FUtvmietXWHJxZK9x4%2FYYdLR6OXAVfvasiSNV2S8iie1Hz7xBGlTJMN8db%2BJ2tkE7GTnOXItMqMU8nuB0z6eddkoQmBESG8EOBr3AEG4x7XaEmP47FqUFsWoikKL2yhwZ9VHL%2F5ANZbvYnfbY1WBjVVOY4wQE1T6CDHM6En2Ov%2FzbTUENH7dasoIaJKWCXa7b1hBhc5MLOMB0MUQWRjb3cVoTHkZ1IRKh3InOdUduyORXOJpwLBTfLu6Q7%2FMEASTXd2j1N9F3OSJ7LYpOfiVhSvA%2FIW6CT2srzKniP5KgeX%2BYKTnNQ%3D%3D",
"sources": [
{
"index": 1,
"name": "rotation.pdf",
"pageCount": 2,
"startPage": 1,
"endPage": 2
},
{
"index": 2,
"name": "sizes.pdf",
"pageCount": 3,
"startPage": 3,
"endPage": 5
}
]
}
}
Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
pdfName | string | a356acc9-c44f-4363-9cda-14ed160d5f5d.pdf | File name of the merged PDF |
fileCount | number | 2 | Number of PDFs merged |
pageCount | number | 5 | Pages in the merged PDF |
size | number | 13539 | Size of the merged PDF in bytes |
expires | number | 1792230036453 | When the download link expires (Unix time in milliseconds) |
downloadURL | string | https://storage.googleapis.com/apiverve/APIData/pdfmerge/a356acc9-c44f-4363-9cda-14ed160d5f5d.pdf?Go… | Signed link to download the merged PDF, valid for 2 days |
sourcesPremium | array[2] | Each input file and the pages it occupies in the merged PDF | |
sources.0.indexPremium | number | 1 | Position of the file in the request, from 1 |
sources.0.namePremium | string | rotation.pdf | File name of the input |
sources.0.pageCountPremium | number | 2 | Pages in this input |
sources.0.startPagePremium | number | 1 | First page of this input in the merged PDF |
sources.0.endPagePremium | number | 2 | Last page of this input in the merged PDF |
Failure modes
Errors come back as tool errors carrying a sentence the model can act on, not a bare status code. Error handling covers the full list.
| Status | What it means |
|---|---|
400 / 422 | The arguments did not validate. The message names the offending one. |
401 | The OAuth session is invalid or expired — reconnect the server. |
403 | Blocked by a key restriction or an IP allow-list. Never a bad identity. |
404 | This skill is not part of VerveKit. Check the catalog. |
429 | Out of credits, or a brief rate limit. The message tells them apart. |
A call costs 10 credits each time the tool actually runs; a model that reasons about the tool without calling it costs nothing.
Use cases
- Document Packets
- Bundle a contract, its schedules and supporting documents into one PDF for signing or archiving.
- Report Assembly
- Join generated report sections, cover pages and appendices into a single deliverable.
- Invoice Batches
- Combine a customer's invoices or statements for the month into one file to send.
- Application Uploads
- Merge the separate scans a user uploads into one document before storing it.
Other ways to use PDF Merge
Set up PDF Merge on VerveKit, or reach the same source a different way. Your VerveKit account and credits work on all of them — one key, one balance.
Related
More in Documents: