Add page numbers to PDF
pdf_page_numbersPrint page numbers on a PDF using a format template with {n} (page number) and {total} (page count), e.g. "Page {n} of {total}". Default is "{n} / {total}" at bottom-center, 10 pt. Numbers sit upright for any page size or rotation. Standard Helvetica only (WinAnsi characters). Page i always shows start+i-1 even when pages selects only some pages. Returns the result inline as an application/pdf resource; the source is never modified.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"pdf_path": "<pdf_path>"
},
"name": "pdf_page_numbers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Font size in points, default 10 | |
| pages | No | 1-based page spec such as "1-3,5"; default all pages | |
| start | No | Number shown on page 1, default 1 | |
| format | No | Template with {n} and {total}, default "{n} / {total}" | |
| margin | No | Distance in points from the page edge, default 24 | |
| password | No | Password to open the input, only needed for a user-password PDF (owner-locked files with an empty user password open without it). | |
| pdf_path | Yes | PDF source: an https:// URL or a data:application/pdf;base64,… URI (this hosted server cannot read local file paths). | |
| position | No | Default bottom-center |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bytes | Yes | Size of the produced PDF in bytes | |
| resource_uri | No | pdfops:// uri of the inline application/pdf resource |