Skip to main content
Glama

Cofferdock

Add page numbers to a PDF

add_pdf_page_numbers
Idempotent

Add page numbers to a PDF. Stamps a page number on every page (or on pages). The format text must contain {n}; it can also use {total}.

Costs 1 credit per call.

Returns a temporary download link (valid 15 minutes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesThe PDF, base64-encoded.
colorNoText color as a hex code, e.g. "#000000" (black, default).#000000
pagesNoPages to act on, 1-indexed, e.g. "1-3,5,7-9". Default: all pages.
startNoNumber shown on the first page (default 1).
formatNoe.g. "Page {n} of {total}".{n}
marginNoDistance from the page edge to the number, in points (0-200). Default 24.
positionNoWhere to print the number: "bottom-center" (default), "bottom-left", "bottom-right", "top-center", "top-left" or "top-right".bottom-center
font_sizeNoFont size in points (6-72). Default 10.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

The description discloses that the call costs 1 credit and returns a temporary download link valid for 15 minutes—information not present in annotations. It also states the stamping behavior and the format constraint. Annotations already indicate idempotentHint=true and readOnlyHint=false, which align with the description; the added cost and link expiry provide useful behavioral context beyond annotations.

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?

The description is three concise sentences, front-loaded with the primary purpose. Every sentence adds value: the action, the format constraint, and the cost/link expiry. No filler or redundancy.

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?

The description covers the return value (temporary download link with expiry), the cost, and the format requirement. It does not mention error conditions or prerequisites beyond the base64 encoding (which is in the schema). For a tool with no output schema, this is reasonably complete; a small gap is the lack of explicit mention that a new PDF is returned rather than modifying the input, though the link implies this.

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

Parameters4/5

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

Schema coverage is 100% with all parameters described, so the baseline is 3. The description adds a critical constraint on the `format` parameter: it must contain {n} and may use {total}. This is not explicitly stated in the schema (which only gives an example). This added semantic value raises the score.

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?

The description clearly states the verb 'Add' and resource 'page numbers to a PDF', and elaborates with 'Stamps a page number on every page'. This distinguishes it from siblings like watermark_pdf (which adds watermarks) and extract_pdf_text (which extracts). The purpose is unambiguous and specific.

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 implies usage for adding page numbers to PDFs, and clarifies that it can target specific pages via the `pages` parameter. It does not explicitly name alternatives or exclusions, but the context is clear enough that an agent would know when to select this tool over siblings like watermark_pdf. A slight gap is the lack of explicit 'when not to use' guidance.

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