Skip to main content
Glama

pdfedit-mcp

Edit a PDF

pdf_edit
Idempotent

Edit the text of an existing PDF in place: replace, delete, redact, insert, or fill form fields, keeping the original layout, fonts and everything you did not point at. edits[] is taken exactly as the API takes it (op, scope, match, fit), and the result carries up to 3 before/after previews of the pages that changed. To change text on one page only, set scope.pages; to pick one of several identical matches, use scope.after with nearby text or scope.occurrence. Use op: 'redact' when the text must be unrecoverable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesThe PDF: an absolute (or ~) local path, which this server uploads for you, an https:// URL the API fetches, or an `f_…` file id from an earlier call.
editsYesThe edits to apply, in order, exactly as `POST /v1/edit` takes them.
optionsNo
passwordNoThe document open password, when it has one.
output_pathNoWhere to write the edited PDF (stdio mode only). Default: `<name>.edited.pdf` next to the input.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare non-readonly, non-destructive, idempotent, open-world. The description adds genuinely new behavior: original layout/fonts and untouched content are preserved, up to 3 before/after page previews are returned, and the server uploads local paths for you. It still does not mention permissions, size limits, or what happens with multiple failing edits in a batch.

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?

Front-loaded with the verb and resource, then capabilities, then option-level guidance. Every sentence carries content, though the second sentence packs a dense `op`, `scope`, `match`, `fit` enumeration that is somewhat run-on.

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?

For a nested-schema mutation tool with no output schema, the description covers the core edit model, targeting rules, and the preview return. Gaps remain around the many `options` flags and password handling, but the schema's 80% coverage plus defaults mitigate much of that.

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 80%, so the baseline is 3 and most fields are already documented. The description does add real meaning beyond the schema for scope.pages, scope.after/occurrence disambiguation, and the preview payload, but leaves the large `options` surface (atomic, dry_run, strict, ocr, tidy) entirely unexplained.

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?

States a specific verb and resource with enumerated capabilities: 'Edit the text of an existing PDF in place: replace, delete, redact, insert, or fill form fields.' This is far more specific than the title, but it never names or contrasts with siblings such as pdf_batch or pdf_find, so an agent must infer the boundary on its own.

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?

Gives clear in-tool routing rules: scope.pages for a single page, scope.after/occurrence to disambiguate identical matches, and op:'redact' when the text must be unrecoverable. It does not say when to prefer pdf_batch (many files) or pdf_find (locating text first), so cross-tool selection is left implicit.

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.