Skip to main content
Glama

pdfedit-mcp

Batch-edit a PDF template

pdf_batch
Idempotent

Apply the same edits to one template PDF once per record, producing one output document per record — a mail merge over an existing PDF. Returns a job_id: call pdf_job with it for the per-record results. 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. Used as the template for every record.
editsYesThe edits applied to each record, with `{field}` placeholders filled from it.
optionsNo
recordsNoOne object per output document.
passwordNo
records_urlNoA CSV or JSONL file of records, instead of `records`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Adds behavior beyond the annotations: it discloses that the call returns a `job_id` consumed by `pdf_job`, i.e. an asynchronous job pattern the annotations do not convey. It also flags redaction as an irreversibility concern. It does not touch idempotency or the dry_run/preview options, so it stops short of full disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences, all front-loaded: what it does, what it returns, then two conditional usage tips. Every sentence earns its place with no filler.

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?

No output schema exists, and the description correctly states the return value (`job_id`) and where to get results. For a tool with ~20 option flags, records/records_url, and nested edits, the core path is covered but the option surface is left entirely to the schema.

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 coverage is 67%, and the description compensates meaningfully by explaining the three scope selectors (`pages`, `after`, `occurrence`) and the `redact` op — semantics that the schema only exposes as bare defaults. It leaves `edits` placeholder substitution (`{field}`) mostly to the schema, so not a 5.

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?

Names a specific verb (apply edits), the resource (one template PDF), and the cardinality (once per record, one output per record). The mail-merge analogy and the explicit handoff to `pdf_batch`'s sibling `pdf_job` make it unmistakable versus `pdf_edit`.

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?

Routes the agent to `pdf_job` for results and gives conditional guidance (use `scope.pages` for one page, `scope.after`/`scope.occurrence` for ambiguous matches, `op: 'redact'` when text must be unrecoverable). No explicit when-not-to-use versus `pdf_edit`, but the per-record framing implies the distinction.

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.