Skip to main content
Glama

Add page numbers

add_page_numbers

Add 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

NameRequiredDescriptionDefault
fileYesPath to the file (absolute, or relative to the working directory).
startNoNumber on the first page. Default 1.
styleNo"number" (3) or "page-of" (Page 3 of 10). Default number.
outputNoWhere to save the result. Defaults to a new file next to the input.
positionNoWhere the number goes. Default bottom-center.

Output Schema

NameRequiredDescriptionDefault
notesYesAnything the output does not carry over from the input.
summaryYesOne line describing the result.
writtenYesPaths of the files written, in order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.2

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare it is a writer that is neither destructive nor idempotent; the description corroborates and enriches this by stating the input is not changed and a copy is saved. It also discloses the non-obvious orientation behavior on rotated pages and the password prerequisite. Returns-path info is partly redundant given an output schema exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three compact sentences, each carrying distinct value: what it produces, what it does not affect plus the return, and the blocking prerequisite. The core action is front-loaded with zero filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter tool with full schema coverage and an output schema, the description covers everything an agent needs before calling: it is a copy-producing write, the original is untouched, the return is a saved path, and locked inputs must be unlocked first.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters including the start number, style, output path, and position are already documented. The description only reinforces the concept of numbering every page and the upright-on-rotation behavior; it adds no syntax or default details beyond the schema. Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Save a copy of a PDF with a page number on every page') and adds a distinguishing nuance about upright numbering on rotated pages. It does not explicitly separate itself from the closest sibling, watermark_pdf, which also stamps content onto pages, so an agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit condition-based routing rule: 'Password-protected PDFs need unlock_pdf first.' That is real guidance an agent can act on. It stops short of a full when-to-use statement or exclusory guidance against other stamping tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.