Skip to main content
Glama

Scan files for sensitive data

scan_files
Read-onlyIdempotent

Audit files or folders to count PII, PHI, and secrets per file, returning masked samples and line numbers while never exposing raw values.

Instructions

Audit a file or folder: per-file counts of PII/PHI/secrets with masked samples and line numbers. Raw values are never returned.

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": {
      "path": "<path>"
    },
    "name": "scan_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile or directory to audit
policyNoPolicy pack(s), e.g. 'hipaa', 'dpdp,secrets', 'all,-URL'. Default: server setting.
excludeNoGlob patterns to skip
includeNoGlob patterns to include, e.g. ['*.csv']
max_filesNoStop after this many files

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is largely covered. The description still adds real value with the privacy guarantee that raw values are never returned and that samples are masked with line numbers, which is behavior an agent cannot derive from annotations or schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences, both front-loaded with the action and the result shape. No filler, no restatement of the title, and the privacy constraint lands as a clean closing clause.

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 an output schema present, the description needn't explain return values, and it correctly focuses on scope and the masking guarantee. The only gap is that it doesn't flag truncation behavior when max_files (default 2000) is hit, which matters for an audit agent interpreting partial results.

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 path, policy, include/exclude globs, and max_files are all self-documenting. The description adds no parameter-level meaning such as policy pack syntax or truncation handling, which is acceptable given the complete schema.

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 names a specific verb ('Audit') and resource ('a file or folder') and even characterizes the output ('per-file counts of PII/PHI/secrets with masked samples and line numbers'). It stops short of distinguishing itself from the 'scan' sibling, so an agent can't tell from text alone which entry point to prefer.

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?

Auditing framing implies a context of use, but there is no explicit when-to-use or when-not guidance and no mention of alternatives such as 'scan' or the 'redact*' family. The agent must infer that this is the read-only inspection step preceding redaction.

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