Skip to main content
Glama

pdf_header_footer

Add Header/Footer — Add custom text headers and/or footers to every page of a PDF, with optional page numbers. At least one of header, footer, or pageNumbers (other than 'none') is required. [category: pdf]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesInput PDF (max 50MB)
colorNoHex color #rrggbb.#404040
pagesNoOptional page range, e.g. '1-3,5'. Empty = all pages.
footerNoFooter text.
headerNoHeader text. At least one of header/footer/pageNumbers is required.
marginNoHow far in from the edge of the page the text sits, in points (72 = 1 inch).
fontSizeNoText size in points.
fontFamilyNoTypeface for the header and footer text.Helvetica
footerAlignNoLine the footer text up left, centred, or right.center
headerAlignNoLine the header text up left, centred, or right.center
pageNumbersNoPage-number style.none
outputFilenameNoOptional custom output filename.
pageNumberPositionNoPut the page number in the header or the footer.footer

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / pages / title
      Added value: +"Pages to add the header and footer to"
    • addedInput schema / properties / pages / x-ui
      Added value: +{
      +  "no_recall": true,
      +  "page_select": {}
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / footer / x-ui
      Added value: +{
      +  "unset_label": "No footer text"
      +}
    • addedInput schema / properties / header / x-ui
      Added value: +{
      +  "unset_label": "No header text"
      +}
    • addedInput schema / properties / outputFilename / x-ui
      Added value: +{
      +  "unset_label": "Keeps your file's name"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / fontSize / x-ui
      Added value: +{
      +  "unit": "pt"
      +}
    • addedInput schema / properties / margin / x-ui
      Added value: +{
      +  "unit": "pt"
      +}
  4. Changed8 schema fields changed
    • changedInput schema / properties / fontFamily / description
      Previous value: -"Exactly Helvetica, Times-Roman, or Courier (case-sensitive); anything else silently becomes Helvetica."New value: +"Typeface for the header and footer text."
    • changedInput schema / properties / fontSize / description
      Previous value: -"Points, integer 6-20; anything outside that range (or non-integer) silently resets to 10."New value: +"Text size in points."
    • changedInput schema / properties / footerAlign / description
      Previous value: -"left|center|right; unknown values silently become center."New value: +"Line the footer text up left, centred, or right."
    • changedInput schema / properties / headerAlign / description
      Previous value: -"left|center|right; unknown values silently become center."New value: +"Line the header text up left, centred, or right."
    • changedInput schema / properties / margin / description
      Previous value: -"Distance from the page edge in points, 10-100; out-of-range or non-numeric silently resets to 30."New value: +"How far in from the edge of the page the text sits, in points (72 = 1 inch)."
    • changedInput schema / properties / pageNumberPosition / description
      Previous value: -"header or footer; anything else → footer. Only matters when pageNumbers is not 'none'."New value: +"Put the page number in the header or the footer."
    • addedInput schema / properties / pageNumberPosition / x-show-when
      Added value: +{
      +  "pageNumbers": [
      +    "simple",
      +    "pageN",
      +    "nOfTotal",
      +    "pageNOfTotal"
      +  ]
      +}
    • addedInput schema / properties / pageNumbers / x-ui
      Added value: +{
      +  "labels": {
      +    "nOfTotal": "7 of 12",
      +    "none": "No page numbers",
      +    "pageN": "Page 7",
      +    "pageNOfTotal": "Page 7 of 12",
      +    "simple": "7"
      +  }
      +}
  5. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the agent knows this is not a read-only operation. The description adds useful scope ('every page', optional page numbers) but does not clarify whether the input is overwritten or a new file is returned. Since the annotations cover the mutation profile and the schema documents the output filename parameter, this is adequate but not richly transparent.

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?

The description is compact and front-loaded with the key verb and resource. The mandatory-condition sentence earns its place because it prevents invalid calls. The '[category: pdf]' tag is minor extra context. There is slight redundancy with the title 'Add Header/Footer' repeating the action, but overall it is efficient.

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

Completeness3/5

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

With 13 parameters fully documented in the schema, the input side is well covered. However, there is no output schema and the description does not state what the tool returns (e.g., a download link, new filename, or modified PDF). The lack of an explicit alternative for page-number-only use also leaves a small routing gap, but the core call requirements are present.

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 the baseline is 3. The description does add the cross-parameter requirement that at least one of header, footer, or pageNumbers must be set, but that same rule is already present in the header parameter's schema description. No additional semantic detail is given for color, page ranges, margins, font, or alignment.

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?

The description states a specific action and resource: 'Add custom text headers and/or footers to every page of a PDF, with optional page numbers.' This clearly identifies the tool's function. However, it does not explicitly distinguish itself from the sibling tool pdf_page_numbers, which may cause confusion when a user only wants page numbers.

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

Usage Guidelines3/5

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

The intended use case is implied by the description: use this when you need headers/footers on PDF pages. The required-condition sentence ('At least one of header, footer, or pageNumbers...') gives a usage constraint, but there is no explicit guidance about when not to use it or when to prefer pdf_page_numbers or pdf_watermark instead.

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