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
POST https://paperwellpageplan.usefulweb.site/api/v1/calculate– run Paperwell PDF Page PlannerGET https://paperwellpageplan.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
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.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (merge, split-every, split-ranges, pages, remove, rotate) | "merge" | Operation |
files | table | — | PDFs (name and page count) |
order | text | — | Merge order. File numbers, e.g. "2,1,3". Files not listed follow in their original order. |
pages | text | — | 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. |
everyN | integer | 1 | Pages per part (split every N) |
ranges | textarea | — | Ranges (split by ranges). One part per range, separated by ";" or new lines, e.g. "1-3; 4-end". |
angle | select (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)
- Streamable HTTP endpoint:
https://paperwellpageplan.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
paperwell_page_plan - Local stdio connector:
node src/mcp-stdio.ts --tool=paperwell-page-plan
{
"mcpServers": {
"paperwell-page-plan": { "type": "http", "url": "https://paperwellpageplan.usefulweb.site/mcp" }
}
}