Skip to main content
Glama

Edit text in PDF

edit_pdf_text
Idempotent

Change, correct or delete text INSIDE the original PDF, keeping its fonts, sizes, colors and layout.

Use this whenever the user wants their existing PDF updated rather than a new document: fix a typo, change a date, amount, name or address, update a CV or a price list, translate a heading, remove a line. Read the PDF first, then pass one edit per change with find copied exactly as printed in the document. Dates and amounts written differently in the PDF (12/08/2026 vs August 12, 2026; 1240 vs 1,240.00) are matched and rewritten in the document's format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYesThe PDF to edit (shared in the conversation).
editsYesChanges to write, applied in order. Each one replaces every occurrence of `find` (only on `page` when given).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare write/not-read-only, idempotent, and non-destructive, so the statement that layout, fonts, sizes and colors are preserved is meaningful added context about what is NOT destroyed. It also discloses non-obvious behavior: date/amount normalization (12/08/2026 vs August 12, 2026; 1240 vs 1,240.00) and one-edit-per-change application. It does not cover failure behavior when `find` matches nothing, which is the main residual gap.

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 core action in the first sentence, then usage, then a procedural instruction. The example list is somewhat long, but each item clarifies the class of permitted edits rather than padding.

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?

With annotations, a fully described 2-parameter schema and an output schema, the description need not explain return values, and it covers purpose, prerequisites and format-preservation well. The remaining gap is what happens when the target text is not found or matches multiple pages.

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 100%, so baseline is 3, but the description adds real semantics: `find` must be copied exactly as printed and kept short for reliability, one edit per change, and matching is format-aware for dates/amounts. The `page` scoping behavior is left to the schema.

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?

States a specific verb+resource (change/correct/delete text inside an existing PDF) and explicitly distinguishes in-place editing from producing a new document. None of the siblings (merge, split, compress, rotate, protect) edit content, so an agent can route to this tool unambiguously.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ('whenever the user wants their existing PDF updated rather than a new document') plus a concrete example list (typo, date, amount, name, CV, price list, translate heading, remove line). It also states the precondition ('read the PDF first') and the alternative (create a new document) rather than leaving it to inference.

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.