Skip to main content
Glama

scrub_pii

Detect and redact personally identifiable information (PII) from Word documents. Use dry run to review detected entities before committing redaction.

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
output_pathNo
entitiesNo
confidence_thresholdNo
dry_runNo
also_sanitize_metadataNo
redact_authors_asNoREDACTED

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 is experimental, may miss PII, details specific NER gaps, and explains the redaction method (true XML deletion, not just formatting). It also mentions automatic model download and the output format for dry_run.

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 sections (summary, warning, limitations, entities, args), but slightly verbose. Every sentence adds value, and key warnings are front-loaded. Minor conciseness improvements possible.

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 and lack of annotations, the description is exceptionally complete. It covers purpose, usage, limitations, parameters, output behavior (entity list in dry_run, redacted file otherwise), and technical details (model download, redaction method). No gaps remain.

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?

Despite 0% schema coverage, the description explains all six parameters (output_path, entities, confidence_threshold, dry_run, also_sanitize_metadata, redact_authors_as) with clear purpose and defaults, fully compensating for the missing schema descriptions.

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 clearly states it detects and redacts PII using Presidio + spaCy NER, listing specific entity types and the redaction method (true XML deletion). It distinguishes itself from sibling tools like redact_text or sanitize_metadata by focusing on NER-based PII detection.

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 explicit usage guidance: warns about experimental nature, recommends dry_run first, and lists known limitations. It does not directly compare to sibling tools but offers clear context for when to use (PII detection with caution) and how to use (dry_run, manual review).

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/SecurityRonin/docx-mcp'

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