Skip to main content
Glama

PDF Page Numbers API - add page numbers to a PDF

pdf_page_numbers
Read-onlyIdempotent

Stamp page numbers on every page: position (6 places), style (1 / Page 1 / Page 1 of N / - 1 -), first number, text size, optional no number on the cover page. Runs on our server, files are deleted right after the call, nothing stored. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.005/call via x402 at https://radarbg.com/x402/pdf-page-numbers.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "format": "of",
      "fileName": "sample.pdf",
      "fileContent": "JVBERi0xLjMKJeLjz9MKMSAwIG9iago8PAovUHJvZHVjZXIgKHB5cGRmKQo+PgplbmRvYmoKMiAwIG9iago8PAovVHlwZSAvUGFnZXMKL0NvdW50IDEKL0tpZHMgWyA0IDAgUiBdCj4+CmVuZG9iagozIDAgb2JqCjw8Ci9UeXBlIC9DYXRhbG9nCi9QYWdlcyAyIDAgUgo+PgplbmRvYmoKNCAwIG9iago8PAovVHlwZSAvUGFnZQovUmVzb3VyY2VzIDw8Cj4+Ci9NZWRpYUJveCBbIDAuMCAwLjAgNTk1IDg0MiBdCi9QYXJlbnQgMiAwIFIKPj4KZW5kb2JqCnhyZWYKMCA1CjAwMDAwMDAwMDAgNjU1MzUgZiAKMDAwMDAwMDAxNSAwMDAwMCBuIAowMDAwMDAwMDU0IDAwMDAwIG4gCjAwMDAwMDAxMTMgMDAwMDAgbiAKMDAwMDAwMDE2MiAwMDAwMCBuIAp0cmFpbGVyCjw8Ci9TaXplIDUKL1Jvb3QgMyAwIFIKL0luZm8gMSAwIFIKPj4Kc3RhcnR4cmVmCjI1NgolJUVPRgo="
    },
    "name": "pdf_page_numbers"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeNoText size in points, default 10
filesNoOr several files: [{fileName, fileContent (base64)}]
startNoFirst page number, default 1
formatNon = 1, page = Page 1, of = Page 1 of N, dash = - 1 -n
fileNameNoFile name with extension, e.g. report.pdf
positionNobc bottom center, br, bl, tc top center, tr, tlbc
skipFirstNoNo number on the first page (cover)
fileContentNoThe file as base64 (a data: URI is fine)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / size / minimum
      Added value: +0
    • addedInput schema / properties / start / minimum
      Added value: +0
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent and open-world, and the description goes well beyond them: server-side execution, files deleted immediately after the call with nothing stored, a free tier of 5 calls/day per IP, and two paid paths (API key via X-API-Key or x402 per-call). That is exactly the privacy, rate-limit and auth context an agent needs before sending a document.

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

Conciseness4/5

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

Purpose is front-loaded in the first clause, followed by options and then operational details. The pricing URL and per-call cost add length but are operationally relevant; the only slight redundancy is repeating the style menu that also appears in the enum.

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

Completeness4/5

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

For an 8-parameter, zero-required tool with no output schema, the description covers purpose, options, privacy and billing well. The notable gap is the return value: it never states that the stamped PDF comes back (presumably base64), nor how the single-file parameters relate to the 'files' array alternative.

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%, including enum meanings for format and position, so the schema already carries the parameter documentation. The description restates the options at a high level (6 positions, 4 styles, first number, text size, cover skip) without adding format syntax or constraints beyond what the schema provides; baseline 3 applies.

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

Purpose5/5

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

Opens with a specific verb and resource: 'Stamp page numbers on every page'. It immediately enumerates the configurable aspects (position, style, first number, size, cover skip), so an agent can tell this apart from conversion siblings like excel_to_pdf or pdf_compress without reading the schema.

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?

The description makes the use case clear (numbering pages across an entire document, with cover-page exclusion) and shows the supported numbering styles inline. It does not name an alternative or a when-not-to-use condition, but no sibling in the catalog performs page numbering, so the routing ambiguity is low.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources