pdf_operation
pdfRun a PDF operation: merge several PDFs, split into pages, rotate, delete-pages, extract-pages, number-pages, watermark, or protect. For 'merge' pass file_urls[] or file_base64s[]; for everything else pass a single file_url or file_base64. 'split' returns the pages as base64; the other operations return a signed download URL.
- When to use
- Editing the structure of a PDF: merging several into one, splitting into pages, rotating, deleting or extracting a page range, adding page numbers or a watermark, or password-protecting it.
- Not for
- Turning something else INTO a PDF (convert_file, or html_to_pdf for a web page). Getting images or text OUT of a PDF (convert_file with target_format jpg or txt). One-file-per-page splitting is quicker with split_pdf.
- Returns
- A signed download URL for the resulting PDF, or JSON when the operation produces several files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operation | string | yes | The PDF operation to perform. (merge, split, rotate, delete-pages, extract-pages, number-pages, watermark, protect) |
| file_url | string | no | Public http(s) URL of the input PDF (single-file operations). |
| file_base64 | string | no | Base64 of the input PDF (single-file operations, <=15MB). |
| filename | string | no | Input filename, e.g. 'document.pdf'. |
| file_urls | array | no | For 'merge': the PDF URLs to merge, in order. |
| file_base64s | array | no | For 'merge': base64 of each PDF to merge, in order. |
| pages | string | no | delete-pages / extract-pages: comma-separated 1-based page numbers, e.g. '1,3,5'. |
| degrees | number | no | rotate: clockwise degrees (e.g. 90, 180, 270). |
| text | string | no | watermark: overlay text; protect: the password to lock the PDF. |
| opacity | number | no | watermark: opacity 0-1 (default ~0.3). |
| output_filename | string | no | Optional output filename. |
Example call
JSON-RPC tools/call body (sent to https://convertfleet.com/api/mcp):
{
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": { "name": "pdf_operation", "arguments": {
"file_url": "https://example.com/input",
"operation": "merge"
} }
}Connect first
curl -sN https://convertfleet.com/api/mcp \
-H "Authorization: Bearer flt_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'See the quickstarts for Hermes, Claude, Cursor, OpenClaw, n8n, Zapier and Make.