Skip to main content
Glama

pdf_edit

Apply atomic batch edits to an open PDF: fill AcroForm fields or stamp text overlays, and optionally render pages as PNGs to verify placement.

Instructions

Apply a batch of edits to an open PDF document session. Ops: {op:'set_field', name, value} fills an AcroForm field (checkbox/radio/choice values must match the field's options); {op:'add_text', page, x, y, text, font_size?} stamps a text overlay onto a flat PDF at PDF user-space coordinates (origin bottom-left, points). The batch is atomic: any invalid op rejects the whole batch and the document is unchanged. Pass render_pages (1-based) to get PNG renders back for verifying placement. Rejected once a signature has been requested or the document is signed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opsYes
doc_idYes
user_idNo
render_pagesNo
acknowledge_signature_invalidationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
fieldsNoField inventory after the edit
statusYes
applied_opsYes
page_imagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses batch atomicity (any invalid op rejects the whole batch, document unchanged), the state rule that edits are blocked after a signature is requested or applied, and the coordinate convention for overlays. It omits any mention of auth requirements or how the acknowledge_signature_invalidation escape hatch interacts with that blocking rule.

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?

Front-loads the core purpose, then lists ops compactly, then the atomicity and signature constraints. Every sentence carries information; no padding or restatement of the tool name.

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?

Output schema exists so return values need not be explained, and the description still notes that render_pages returns PNG renders for placement verification. It is nearly complete for a 5-param mutation tool, missing only an explanation of acknowledge_signature_invalidation, which is the natural resolution path for the signature block it describes.

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?

Top-level schema coverage is 0%, so the description must compensate, and it largely does: it defines the discriminated op payloads, the PDF user-space coordinate system with origin and units, the optional font_size, and the 1-based render_pages verification flag. It leaves user_id and acknowledge_signature_invalidation unexplained, the latter being a meaningful gap given the stated signature restriction.

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 and resource ('Apply a batch of edits to an open PDF document session') and immediately enumerates the two supported operations with their shapes. An agent can distinguish this mutation tool from pdf_open, pdf_export, and pdf_request_signature without opening the schema.

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-context guidance on which op to pick (set_field for AcroForm fields, add_text for flat PDFs) and a when-not condition ('Rejected once a signature has been requested or the document is signed'). It does not name or defer to an alternative tool for cases this one can't handle.

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