API & MCP

Everything a person can do on Paperwell PDF Page Planner, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Paperwell PDF Page Planner

Resolves page selections such as "1-3,5,8-end", "odd" or "10-1" against the page counts of your PDFs and lists the exact output files and page sequences of a merge, split, reorder, removal or rotation — before any file is uploaded. It returns the parameters for the pdf-merge-split-reorder tool, so scripts and AI agents can check a plan first.

Inputs of Paperwell PDF Page Planner
FieldTypeDefaultDescription
modeselect (merge, split-every, split-ranges, pages, remove, rotate)"merge"Operation
filestable—PDFs (name and page count)
ordertext—Merge order. File numbers, e.g. "2,1,3". Files not listed follow in their original order.
pagestext—Pages. Page numbers start at 1. Examples: "1-3,5,8-end", "odd", "even", "reverse", "10-1" (descending), "1-9:odd". Leave empty for all pages.
everyNinteger1Pages per part (split every N)
rangestextarea—Ranges (split by ranges). One part per range, separated by ";" or new lines, e.g. "1-3; 4-end".
angleselect (90, 180, 270)"90"Rotation

Example request

Merge three PDFs, appendix first

curl -X POST https://paperwellpageplan.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"merge","files":[{"name":"report.pdf","pages":12},{"name":"appendix.pdf","pages":3},{"name":"cover.pdf","pages":1}],"order":"3,1,2"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "paperwell-page-plan": { "type": "http", "url": "https://paperwellpageplan.usefulweb.site/mcp" }
  }
}