Skip to main content

pdf_operation

pdf

Run 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

NameTypeRequiredDescription
operationstringyesThe PDF operation to perform. (merge, split, rotate, delete-pages, extract-pages, number-pages, watermark, protect)
file_urlstringnoPublic http(s) URL of the input PDF (single-file operations).
file_base64stringnoBase64 of the input PDF (single-file operations, <=15MB).
filenamestringnoInput filename, e.g. 'document.pdf'.
file_urlsarraynoFor 'merge': the PDF URLs to merge, in order.
file_base64sarraynoFor 'merge': base64 of each PDF to merge, in order.
pagesstringnodelete-pages / extract-pages: comma-separated 1-based page numbers, e.g. '1,3,5'.
degreesnumbernorotate: clockwise degrees (e.g. 90, 180, 270).
textstringnowatermark: overlay text; protect: the password to lock the PDF.
opacitynumbernowatermark: opacity 0-1 (default ~0.3).
output_filenamestringnoOptional 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.