Skip to main content
Glama
dambuchs

redact-pdf-mcp

Put the real names back into a file written from a pseudonymized document

restore_names

Replaces pseudonym tags in your edited file with original names from the correspondence table, writing a restored copy locally. Use it to finish a pseudonymize, edit, re-identify workflow.

Instructions

Put the real names back into a file you wrote from a pseudonymized document: every tag ([Person 1], or the user's rename such as [Seller]) becomes the original text from the correspondence table. Runs entirely on this machine; nothing is uploaded.

Use it at the end of the anonymize -> work -> re-identify loop: redact_pdf_and_wait with mode "pseudonymize" gave you document_text and correspondence_path; you did the work on the tagged text and wrote the result to a .md, .txt or .docx file, keeping each tag exactly as written, brackets included. Pass that file and correspondence_path here.

It writes "-restored." next to your file (never over an existing file) and returns only that path and counts, never a name. Do NOT open, read or quote the restored file or the correspondence CSV: both contain the real names, and reading them puts the personal data into this conversation, which is what pseudonymizing was for. Give the user the path instead.

Input Schema

NameRequiredDescriptionDefault
file_pathYesAbsolute path of the file YOU wrote from the pseudonymized text (.md, .markdown, .txt or .docx), with the tags kept as written, e.g. "[Person 1] signed on behalf of [Org 1]". Not the original document.
output_pathNoWhere to write the restored copy. Defaults to "<name>-restored.<ext>" next to file_path. Never overwrites an existing file.
correspondence_pathYesAbsolute path of the correspondence CSV, as returned in correspondence_path by redact_pdf_and_wait or download_correspondence. Pass the path only: do not open the file, it contains the real names.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only mark it non-read-only/non-destructive/non-open-world; the description adds substantial context beyond that: output naming scheme, a no-overwrite guarantee, that only a path and counts are returned, and a privacy warning not to read the restored file or CSV.

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-loads the action in the first sentence and follows with workflow, output behavior, and warnings in a logical order. It runs long, but nearly every clause carries operational or safety information.

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?

Given three parameters, no output schema, and a sensitive mutation, the description covers inputs, output behavior, return contents, and the privacy constraint. An agent has everything it needs to call this correctly and safely.

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 the baseline is 3, but the description adds provenance the schema cannot: file_path must be the file you wrote from the pseudonymized text and correspondence_path comes from redact_pdf_and_wait or download_correspondence. It does not detail output_path beyond what the schema already says.

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 (put back / restore) and resource (real names into a file), and its inverse relationship to the pseudonymize mode of redact_pdf_and_wait makes it unmistakable versus siblings.

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?

Explicitly places the tool at the end of the 'anonymize -> work -> re-identify' loop, names the prerequisite tool and its outputs (document_text, correspondence_path), and states the conditions on the input file (tags kept exactly, brackets included).

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