Skip to main content
Glama

scrub_pii

Detect and redact personally identifiable information (PII) from Word documents using Presidio and spaCy NER. Supports dry-run for review before commitment.

Instructions

[EXPERIMENTAL] Detect and redact PII from the open document using Presidio + spaCy NER.

WARNING: This tool WILL miss PII. It is experimental and NOT suitable for production use or as the sole control for privileged, regulated, or legally sensitive documents. Always run with dry_run=True first and manually review every detected entity before committing a redacted file.

Known limitations (statistical NER gaps):

  • Names in ALL-CAPS (ledger headers, table cells) are frequently missed.

  • Single-token names with no surrounding context are unreliable.

  • Non-English names (Arabic, CJK, African) have low recall on this English model.

  • Names embedded in legal boilerplate ("Borrower: Jane Doe") are often skipped.

NER model (en_core_web_lg, ~560MB) downloads automatically on first use.

Detects: PERSON, EMAIL_ADDRESS, PHONE_NUMBER, CREDIT_CARD, SSN, IP_ADDRESS, IBAN_CODE, US_BANK_NUMBER, US_PASSPORT, and more via Presidio.

Redacted text is replaced with a solid black DrawingML rectangle — true XML redaction where the original text is deleted from the OOXML entirely, not merely hidden by formatting.

Args: output_path: Destination path. Required when dry_run=False. entities: Presidio entity types to redact. None = all detected types. confidence_threshold: Presidio score floor (default 0.35). dry_run: If True, detect only — return entity list, write no file. also_sanitize_metadata: Apply level-3 metadata sanitization (default True). redact_authors_as: Replacement author string for metadata pass.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
entitiesNo
output_pathNo
redact_authors_asNoREDACTED
confidence_thresholdNo
also_sanitize_metadataNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: it warns about experimental nature, explains dry_run detection mode, describes XML redaction method, lists detected entity types, mentions model download, and notes default metadata sanitization. No contradictions.

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?

The description is well-structured with an [EXPERIMENTAL] tag, warning, limitations, technical details, and arg descriptions. It is front-loaded with critical info. While slightly long, every sentence adds value.

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 the tool's complexity, the description covers purpose, usage warnings, limitations, technical details, parameter semantics, and default behaviors. Output schema exists, so return value explanation is not needed. Complete for agent decision-making.

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

Parameters5/5

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

Schema coverage is 0%, but the description includes an 'Args' section explaining each parameter (output_path, entities, confidence_threshold, dry_run, etc.) with defaults and behaviors, adding significant meaning beyond the bare schema.

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?

The description explicitly states 'Detect and redact PII from the open document using Presidio + spaCy NER,' clearly defining the action and resource. It distinguishes itself from siblings like 'redact_text' and 'sanitize_metadata' by specifying PII detection and redaction.

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

Usage Guidelines4/5

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

The description provides strong usage guidance: warns about PII being missed, recommends dry_run first, and lists known limitations. However, it does not explicitly contrast with alternatives like 'redact_text' or 'sanitize_metadata', nor does it clearly state when not to use it beyond the experimental warning.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arvindh95Censof/grp-docx-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server