pdf-modifier-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| read_pdf_structureA | Extract the complete structural content of a PDF document. Returns detailed information about each page including:
Use this tool FIRST to understand the document layout before making any modifications. The output helps identify exact text to target for replacements. Args: input_path: Absolute path to the PDF file to analyze. Must be a valid, accessible PDF file. password: Optional password if the PDF is encrypted. Returns: JSON string containing the complete page structure. On error, returns JSON with success=false and error details. Example: read_pdf_structure("/home/user/documents/invoice.pdf") |
| 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:
Args: input_path: Absolute path to the PDF file to inspect. terms: List of text strings to search for (1-50 terms). Each term is searched as a substring. password: Optional password if the PDF is encrypted. Returns: JSON string with all matches and their font properties. Returns empty matches array if no terms are found. Example: inspect_pdf_fonts("/path/to/doc.pdf", ["Invoice", "$99.99", "Total"]) |
| modify_pdf_contentA | Find and replace text in a PDF while preserving font styles. This tool performs text replacement by:
IMPORTANT BEHAVIORS:
HYPERLINK SUPPORT:
REGEX SUPPORT:
Args: input_path: Absolute path to the source PDF file. output_path: Absolute path where the modified PDF will be saved. Parent directory must exist. replacements: Dictionary mapping old text to new text. Keys are search strings (or regex if use_regex=true). Values are replacement strings (optionally with |URL). use_regex: If true, treat replacement keys as regex patterns. Default is false for literal string matching. password: Optional password if the source PDF is encrypted. Returns: JSON string with modification results including: - success: boolean indicating if operation completed - replacements_made: count of text spans modified - pages_modified: count of pages with changes - warnings: any non-fatal issues encountered Examples: # Simple text replacement modify_pdf_content( "/path/input.pdf", "/path/output.pdf", {"$99.99": "$149.99", "Draft": "Final"} ) |
| 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. Args: input_path: Absolute path to the PDF file to scan. password: Optional password if the PDF is encrypted. Returns: JSON string with the inventory of found hyperlinks. Example: list_pdf_hyperlinks("/path/to/report.pdf") |
| 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
Args: input_paths: List of absolute paths to input PDF files. output_dir: Directory where modified PDFs will be saved. replacements: Dictionary mapping old text to new text. use_regex: If true, treat keys as regex patterns. password: Optional password if PDFs are encrypted. Returns: JSON string with batch results including per-file status. Example: batch_modify_pdf_content( ["/path/a.pdf", "/path/b.pdf"], "/path/output", {"Draft": "Final", "2024": "2025"} ) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
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