add_page_numbers
Stamp sequential page numbers or Bates-style IDs onto PDF pages, choosing format, start value, position, and page range for legal or archival documents.
Instructions
Add page numbers, or Bates numbers for legal documents (format="ACME-{n:06}").
format uses {n} (required), {total} and zero padding like {n:06}. Page k shows n = k + start - 1, so start=0 with pages="2-" skips a cover page and numbers the next page 1. position: top-/bottom- left/center/right (default bottom-center). Needs the owner password if the PDF forbids changes. Signed PDFs are refused.
Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.
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": {
"input_path": "<input_path>"
},
"name": "add_page_numbers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | black | |
| pages | No | ||
| start | No | ||
| format | No | Page {n} of {total} | |
| margin | No | ||
| password | No | ||
| position | No | bottom-center | |
| font_size | No | ||
| overwrite | No | ||
| input_path | Yes | ||
| output_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | ||
| output | Yes | ||
| last_label | Yes | ||
| first_label | Yes | ||
| password_protected | Yes | ||
| user_password_changed | Yes | ||
| permissions_restricted | Yes |