# How to prepare documents for disclosure with an AI agent Prepare documents for legal disclosure or FOI release with an AI agent over MCP: redact text, cover images, clear annotations and metadata, then verify. Disclosure is where partial redaction becomes a headline. The work is not hard; it is *sequential*, and each step writes a new file. {{< alert style="info" >}} 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]({{< ref "redaction/net/mcp/_index.md" >}}). Other platforms will expose the same tools with their own launch command; everything else on this page applies unchanged. {{< /alert >}} ## The order 1. **Text** — [`redact_text`]({{< ref "redaction/mcp/tools-reference/redact-text.md" >}}) for each pattern: names, emails, identifiers, account numbers. 2. **Images** — [`redact_image_area`]({{< ref "redaction/mcp/tools-reference/redact-image-area.md" >}}) for signatures, photographs, stamps, and any scanned region. 3. **Annotations** — [`redact_annotations`]({{< ref "redaction/mcp/tools-reference/redact-annotations.md" >}}), usually `deleteAll`, because internal review notes are rarely disclosable. 4. **Metadata** — [`erase_metadata`]({{< ref "redaction/mcp/tools-reference/erase-metadata.md" >}}) for author, company, and dates. 5. **Verify** — [Verify a redaction]({{< ref "redaction/mcp/use-cases/verify-a-redaction.md" >}}). ## 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 name the file each step produced. The two clauses at the end are what make the result trustworthy: **chaining** keeps every redaction, and **named files** make each step traceable. ## Why chaining is the failure everyone hits Each tool writes `_redacted.`-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`]({{< ref "redaction/mcp/tools-reference/redact-text.md" >}}) call, chained the same way. Ask for them one at a time, with the file each call produced, rather than as a single opaque instruction: five calls with five named files 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`]({{< ref "redaction/mcp/tools-reference/get-license-status.md" >}}); see [Licensing]({{< ref "redaction/mcp/getting-started/licensing.md" >}}). ## 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]({{< ref "redaction/net/mcp/configuration.md" >}})) so redacted copies land somewhere distinct. Releasing the wrong file is not a redaction failure, but it fails just as badly. ## Read more * [Enforce disclosure redaction policy with automated AI workflows using MCP](https://blog.groupdocs.com/redaction/enforce-disclosure-redaction-automated-workflows-mcp/) — the same scenario on the GroupDocs blog, with worked examples and the trade-offs.