Skip to main content
Glama
mlorentedev

pdf-modifier-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
read_pdf_structureA

Extract the complete structural content of a PDF document.

Returns detailed information about each page including:

  • Page dimensions (width, height)

  • All text elements with their:

    • Exact text content

    • Bounding box coordinates (x0, y0, x1, y1)

    • Origin point for text insertion

    • Font name and size

    • Color value

Use this tool FIRST to understand the document layout before making any modifications. The output helps identify exact text to target for replacements.

inspect_pdf_fontsA

Search for specific text terms and report their font properties.

Use this tool to understand the exact font styling of text you want to replace. This ensures replacements will match the surrounding document style as closely as possible.

The tool searches through all pages and returns matches with:

  • Page number where the term was found

  • The search term that matched

  • Surrounding context (first 100 characters)

  • Font name (e.g., "Helvetica-Bold", "Times-Roman")

  • Font size in points

  • Origin coordinates for precise positioning

modify_pdf_contentA

Find and replace text in a PDF while preserving font styles.

This tool performs text replacement by:

  1. Locating all occurrences of the search text

  2. Redacting the original text (white fill)

  3. Inserting the replacement text with matched styling

IMPORTANT BEHAVIORS:

  • Text is matched within individual text spans

  • Font style is approximated using Base 14 fonts (Helvetica, Times, Courier)

  • Replacement text should be similar length to avoid overlap

  • Multiple replacements can be specified in a single call

HYPERLINK SUPPORT:

  • Append "|URL" to create a clickable link: "Click Here|https://example.com"

  • Use "|void(0)" to neutralize existing links: "Product|void(0)"

REGEX SUPPORT:

  • Set use_regex=true to treat keys as regex patterns

  • Useful for matching dates, IDs, or variable content

  • Example: {"Order #\d+": "Order #REDACTED"}

PAGE RANGE:

  • Use pages="1-3" to process only pages 1 through 3 (1-indexed, inclusive)

  • Use pages="5" to process only page 5

  • Omit to process all pages

list_pdf_hyperlinksA

Extract all existing hyperlinks and clickable URIs from a PDF.

Use this tool to inventory the links in a document before or after making modifications. It reports the target URI, its location (bbox), and the text covered by the link if detectable.

extract_embedded_fontsA

Extract metadata and buffers of all embedded fonts in a PDF.

Use this tool to inspect which fonts are actually embedded in a document. Custom fonts (TrueType, OpenType) appear as Type0 with their binary buffer. Base 14 system fonts (Helvetica, Times, Courier) are NOT embedded and will not appear in the results.

batch_modify_pdf_contentA

Apply the same text replacements to multiple PDF files at once.

Each file is processed independently -- a failure in one file does not stop the rest of the batch. Output files are written to output_dir using the same filename as the input.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mlorentedev/pdf-modifier-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server