Skip to main content
Glama
privacyscrubber-mcp

privacyscrubber-mcp

sanitize_file

Idempotent

Reads a local file, masks PII and secrets using a chosen industry profile, and returns sanitized content for AI analysis while keeping original identifiers 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'.
verbose_receiptNoOptional. Detailed multi-line audit receipt breakdown.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.5.5
  2. Removedv2.5.2
  3. 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
  4. 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"
      +}
  5. First observedv1.0.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare idempotent=true, destructiveHint=false and openWorldHint=false, so the description's main added value is the format list and the note that original identifiers are kept in memory. It does not say where the sanitized output goes (returned inline vs. written to a new path) despite readOnlyHint=false implying a side effect, nor does it describe what happens on unsupported formats or oversized files.

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 tight two-sentence definition with the core action and supported formats front-loaded. The trailing sentence about keeping identifiers in memory is somewhat promotional but still conveys a relevant security property, so little is wasted.

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?

With six parameters, a 100% documented schema, and no output schema, the definition is adequate but leaves the return shape unspecified — the agent cannot tell whether it receives sanitized text, a file path, or an audit receipt. For a tool whose whole value is the transformed output, that gap matters.

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 the schema already explains profile, sector alias, session_id, compact and verbose_receipt in detail. The description only restates that the selected profile drives sanitization and adds nothing about how compact/verbose_receipt alter output or how sector and profile interact when both are supplied.

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 chain and resource: reads a local file of enumerated formats, sanitizes its contents with a selected profile, and outputs a safe version. An agent knows exactly what the tool produces. It stops short of differentiating from the sibling sanitize_text or guard_read_file, so the 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', which hints at a pre-analysis redaction step. There is no explicit statement of when to choose this over sanitize_text (for raw strings) or guard_read_file, and no mention of prerequisites such as supported file size limits or when sanitization should be skipped.

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