Skip to main content
Glama

PII Shield

redact_document

Redact PII from an uploaded file or document before sharing it with an AI. Works on PDFs, Word (.docx), Excel (.xlsx), and text-based files (txt, csv, json, code, transcripts, logs). Pass base64 file data with media_type/filename, OR raw text. Returns the redacted text and counts. Requires your workspace key (via the MCP server URL). NOTE: detection is automated and is not a guarantee; it can miss personal data. Review the file yourself before sharing it.

Input Schema

NameRequiredDescriptionDefault
textNoor raw text instead of a file
base64Nobase64-encoded file bytes
filenameNo
detectorsNo
media_typeNoe.g. application/pdf, text/csv
customTermsNo
customPatternsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/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 load and does well: it discloses the auth requirement (workspace key via the MCP server URL), the return shape (redacted text and counts), and an honest caveat that automated detection can miss personal data and should be reviewed manually. It does not say whether the original upload is stored, whether redaction is reversible, or what happens to non-text assets in a PDF, which keeps it short of a 5.

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?

Four tight sentences: capability and formats first, invocation modes second, return value third, risk caveat last. The format list is dense but earns its place; the wording is front-loaded with no filler. Minor redundancy between 'file' and 'document' but nothing worth cutting.

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

Completeness3/5

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

For a 7-parameter, nested-object tool with no annotations and no output schema, the description covers auth, formats, input modes, and returns. The gap is what the tool actually produces for binary inputs — it says 'returns the redacted text and counts', leaving unclear whether a redacted PDF/DOCX file is emitted or only extracted text — and it gives no guidance on the detector/custom-term parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 43%, so the description must compensate, and it does explain the main branch point: base64 with media_type/filename, or raw text. However, three parameters that materially change results — 'detectors', 'customTerms', and 'customPatterns' (a nested object and two arrays) — are never mentioned, leaving the most consequential knobs undocumented in both schema and description.

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 ('Redact PII from an uploaded file or document') and enumerates the supported formats (PDF, .docx, .xlsx, txt/csv/json/code/transcripts/logs). It implicitly contrasts with detect_pii and redact by promising an actual redacted output plus counts, but it never names a sibling, so differentiation is left to inference.

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 a clear motivating context ('before sharing it with an AI') and describes the two invocation modes (base64 file vs raw text). It does not say when to prefer this over the sibling 'redact' or 'detect_pii' tools, nor when redaction is unnecessary, so the when-to-use decision against alternatives is only implied.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources