How to prepare documents for disclosure with an AI agent

Disclosure is where partial redaction becomes a headline. The work is not hard; it is sequential, and each step writes a new file.

Note
The commands and config snippets on this page are for the .NET build of the server — the only platform available today. Installation and client setup: MCP server for .NET. Other platforms will expose the same tools with their own launch command; everything else on this page applies unchanged.

The order

  1. Textredact_text for each pattern: names, emails, identifiers, account numbers.
  2. Imagesredact_image_area for signatures, photographs, stamps, and any scanned region.
  3. Annotationsredact_annotations, usually deleteAll, because internal review notes are rarely disclosable.
  4. Metadataerase_metadata for author, company, and dates.
  5. VerifyVerify a redaction.

The prompt

Take case-file.pdf and prepare it for disclosure: redact all email addresses and the name “Jane Smith”, delete all annotations, clear the document properties. Apply each step to the file produced by the previous one, and report the match count at every step.

The two clauses at the end are what make the result trustworthy: chaining keeps every redaction, and counts make each step checkable.

Why chaining is the failure everyone hits

Each tool writes <name>_redacted.<ext>-style output rather than editing in place. An agent that passes the original into step 2 produces a document with the image covered and the emails back. The file names in the transcript are your audit trail — read them.

Multiple patterns

Each pattern is its own redact_text call, chained the same way. Ask for them one at a time with counts, rather than as a single opaque instruction: five calls with five numbers is a record; one call with “done” is not.

Evaluation mode makes this workflow dangerous

One redaction per document, four replacements maximum. A disclosure pass under those limits produces a document that looks processed and still contains the data — and nothing in the responses says so. Make the licence check the first step:

Before you start: what is the license status of the redaction server?

get_license_status; see Licensing.

Keep the originals separate

The unredacted file still exists, in the same folder, one letter different in the name. Move finished originals out of the working folder, or configure a separate GROUPDOCS_MCP_OUTPUT_PATH (configuration) so redacted copies land somewhere distinct. Releasing the wrong file is not a redaction failure, but it fails just as badly.