Skip to main content
Glama
privacyscrubber-mcp

privacyscrubber-mcp

sanitize_file

Read-onlyIdempotent

Sanitizes local files by masking PII and secrets with an industry profile, then outputs a safe version for AI analysis while retaining original identifiers only in memory.

Instructions

Reads a local file (including plain text, source code, .eml, .rtf, .docx, .pdf, .xlsx), sanitizes its contents using the selected profile, and outputs the safe version for AI analysis. Securely keeps original identifiers in memory.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_path": "<file_path>"
    },
    "name": "sanitize_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
sectorNoOptional alias for 'profile'. The industry sector or compliance vertical to apply (e.g. 'medical', 'finance', 'legal', 'dev', 'hr', 'accounting', 'security', 'compliance', 'underwriting', 'telecom').
compactNoOptional. Compact 1-line audit summary.
profileNoThe detection profile to use. Available: 'General' (Free, 15,000 chars), or 30 specialized industry profiles (5,000 chars Free trial quota; unlimited on PRO/TEAMS/SDK): 'Dev' (Engineering/Code), 'Medical', 'Pharma', 'Biotech', 'Telecom', 'Legal', 'Compliance', 'CCPA', 'Finance', 'Bizops', 'Sales', 'WealthMgmt', 'Insurance', 'Accounting', 'Underwriting', 'Automotive', 'Energy', 'Hospitality', 'HR', 'Security', 'Marketing', 'Support', 'RealEstate', 'Agents', 'Academic', 'Creative', 'Tech', 'Personal', 'Engineering'. Defaults to 'General'.
file_pathYesAbsolute or workspace-relative path to the file to sanitize.
session_idNoOptional session ID for multi-agent isolation. Defaults to 'default'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.0.3
    • addedInput schema / properties / compact
      Added value: +{
      +  "description": "Optional. Compact 1-line audit summary.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / file_path / description
      Previous value: -"Absolute path to the file to sanitize."New value: +"Absolute or workspace-relative path to the file to sanitize."
    • changedInput schema / properties / profile / description
      Previous value: -"The detection profile to use. Available: 'General' (Free), or PRO profiles: 'Dev' (Engineering/Code), 'Medical', 'Pharma', 'Legal', 'Compliance', 'CCPA', 'Finance', 'Bizops', 'Sales', 'WealthMgmt', 'Insurance', 'Accounting', 'HR', 'Security', 'Marketing', 'Support', 'RealEstate', 'Agents', 'Academic', 'Creative', 'Tech', 'Personal'. Defaults to 'General'."New value: +"The detection profile to use. Available: 'General' (Free, 15,000 chars), or 30 specialized industry profiles (5,000 chars Free trial quota; unlimited on PRO/TEAMS/SDK): 'Dev' (Engineering/Code), 'Medical', 'Pharma', 'Biotech', 'Telecom', 'Legal', 'Compliance', 'CCPA', 'Finance', 'Bizops', 'Sales', 'WealthMgmt', 'Insurance', 'Accounting', 'Underwriting', 'Automotive', 'Energy', 'Hospitality', 'HR', 'Security', 'Marketing', 'Support', 'RealEstate', 'Agents', 'Academic', 'Creative', 'Tech', 'Personal', 'Engineering'. Defaults to 'General'."
    • addedInput schema / properties / sector
      Added value: +{
      +  "description": "Optional alias for 'profile'. The industry sector or compliance vertical to apply (e.g. 'medical', 'finance', 'legal', 'dev', 'hr', 'accounting', 'security', 'compliance', 'underwriting', 'telecom').",
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Optional session ID for multi-agent isolation. Defaults to 'default'.",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "text": {
      -      "description": "The sanitized content of the file.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "text"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed4 schema fields changedv1.0.2
    • removedInput schema / properties / filePath
      Removed value: -{
      -  "description": "Absolute path to the file to sanitize.",
      -  "type": "string"
      -}
    • addedInput schema / properties / file_path
      Added value: +{
      +  "description": "Absolute path to the file to sanitize.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "filePath"
      -]New value: +[
      +  "file_path"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "text": {
      +      "description": "The sanitized content of the file.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "text"
      +  ],
      +  "type": "object"
      +}
  3. First observedv1.0.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavior: files are read and sanitized in memory with original identifiers retained 'securely,' which hints that a reveal_text-style tool can restore them later. It does not state whether the on-disk file is ever altered or what quota limits apply, so it falls short of full disclosure.

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?

A single front-loaded sentence leads with the read-then-sanitize action and ends with the in-memory retention note. The parenthetical format list is a bit dense but each element is informative; nothing is padding, though splitting into action plus behavior clauses would read cleaner.

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

Completeness4/5

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

With 5 parameters, full schema coverage, and no output schema, the description needs to say what comes back — and it does ('outputs the safe version for AI analysis'). What remains missing is quota/limit behavior and whether the result is written anywhere, which matters for a tool whose profile choice carries free-tier character caps.

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 description coverage is 100%, so every parameter including profile, sector, compact, and session_id is already documented in the schema, and no enums sit on top of the free-form profile string. The description only gestures at 'the selected profile' without adding selection guidance or examples beyond what the schema supplies, so the baseline 3 applies.

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?

The description states a specific verb and resource (read + sanitize a local file) and enumerates the supported formats (.eml, .pdf, .docx, .xlsx, plain text, source). It never distinguishes this from close siblings like sanitize_text, redact_file, or guard_read_file, so an agent must infer the boundary itself.

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?

Usage is only implied by the phrase 'outputs the safe version for AI analysis' — the agent can infer this is the pre-processing step before sending file contents to a model. There is no explicit when-to-use, when-not-to-use, or pointer to sanitize_text/redact_file for other cases, so routing between siblings is left to guesswork.

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