Skip to main content
Glama

Permanently redact local PDF regions

abox_pdf_redact

Redact specified rectangular areas in local PDFs by rendering pages and masking those regions with opaque black pixels, then writing a new flattened image-only PDF from local JSON coordinates.

Instructions

Render every admitted unencrypted PDF page locally, replace explicitly selected rectangles with opaque black pixels, and write a fresh lossless image-only PDF. Local JSON supplies exact displayed page geometry and top-left point coordinates. Verifies every saved RGB sample, black masks and the new object graph; no source text, attachments, links, annotations or metadata objects are copied. All pages are flattened, searchable text and signatures are lost, and size can increase. Does not identify sensitive areas or prove selected coverage. Requires a local browser.

Input Schema

NameRequiredDescriptionDefault
dpiNo
input_pathYesAbsolute local filesystem path. URLs and network shares are refused.
output_pathYesAbsolute local filesystem path. URLs and network shares are refused.
regions_pathYesAbsolute local filesystem path. URLs and network shares are refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A4.1/5.0
Behavior5/5

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

Discloses behavior well beyond the annotations: no source text, attachments, links, annotations or metadata objects are copied; all pages are flattened; signatures are lost; output size can increase; RGB samples and object graph are verified. These are exactly the consequences an agent needs before invoking an irreversible-content operation.

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, followed by consequences and constraints; nearly every clause carries information. It is dense to the point of being a single run-on, but no sentence is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description covers what is produced (fresh image-only PDF, verified samples) and what is lost, which is the critical return-value context. Given only four parameters and a non-idempotent mutation, an agent has what it needs to call this correctly.

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 75% and the paths are already documented as absolute-local-only, but the description adds real meaning for regions_path ('Local JSON supplies exact displayed page geometry and top-left point coordinates') that the schema does not convey. The dpi parameter is left unaddressed in both places, so it is not a complete 5.

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 ('replace explicitly selected rectangles with opaque black pixels, and write a fresh lossless image-only PDF'), which is far more precise than the title alone. It is distinguishable from siblings like abox_pdf_compress or abox_image_redact by being PDF-region-specific, but it never names those alternatives for contrast.

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

Usage Guidelines3/5

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

Gives useful preconditions ('Requires a local browser', 'admitted unencrypted PDF page', local JSON geometry) and boundaries ('Does not identify sensitive areas or prove selected coverage'), which implies when it is appropriate. However, it never states when to pick this over abox_image_redact or abox_pdf_select, nor what to do if the PDF is encrypted (presumably abox_pdf_unlock).

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