Add page numbers
add_page_numbersAdd page numbers to every page of a PDF and save a copy; numbering stays upright on rotated pages while the original file remains unchanged.
Instructions
Save a copy of a PDF with a page number on every page, upright even on rotated pages. Returns the saved path; the input is not changed. Password-protected PDFs need unlock_pdf first.
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": {
"file": "<file>"
},
"name": "add_page_numbers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to the file (absolute, or relative to the working directory). | |
| start | No | Number on the first page. Default 1. | |
| style | No | "number" (3) or "page-of" (Page 3 of 10). Default number. | |
| output | No | Where to save the result. Defaults to a new file next to the input. | |
| position | No | Where the number goes. Default bottom-center. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | Anything the output does not carry over from the input. | |
| summary | Yes | One line describing the result. | |
| written | Yes | Paths of the files written, in order. |