Skip to main content
Glama
mlorentedev

pdf-modifier-mcp

batch_modify_pdf_content

Apply text replacements to multiple PDF files in a batch, with independent processing that continues despite individual file errors.

Instructions

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.

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"} )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_pathsYes
output_dirYes
replacementsYes
use_regexNo
passwordNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description discloses key behaviors: independent processing, output file naming, use_regex, optional password. It lacks some edge cases like directory creation or overwrite behavior, but is fairly comprehensive.

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 well-structured with a main sentence, behavior details, parameter list, return info, and example. Each part adds value, though it could be slightly more concise.

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?

Given the batch complexity and absence of annotations, the description covers the major aspects: inputs, output, behavior, optional features, and return format. Minor gaps like error handling details are present.

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 description coverage is 0%, so the description must add meaning. It provides clear explanations for all parameters in the Args section, including types and an example, though some parameter details (e.g., path format) could be more precise.

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 tool applies text replacements to multiple PDF files at once, using a specific verb and resource. It distinguishes from sibling tools like modify_pdf_content by being batch-oriented.

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 explains that each file is processed independently and failures don't stop the batch. It implies usage for batch operations but does not explicitly contrast with the singular sibling.

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

Install Server

Other Tools

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