Skip to main content
Glama

PII detector and redactor

scan_pii
Read-onlyIdempotent

PII detector and redactor: finds emails, phone numbers, payment cards (Luhn), IBANs, Aadhaar (Verhoeff), Indian PAN, US SSN, UK NI numbers, Nepal citizenship numbers, passports, dates of birth, IP and wallet addresses in text or a URL; masked findings with positions, optional redacted copy with stable placeholders. Use before logging, storing, summarising or sending text to a third-party model, or to check what personal data a document, transcript or tool result contains. Pass text or url, redact: true for a copy with each value replaced by a placeholder like [EMAIL_1] (same value, same placeholder), and types[] to limit what is reported. Returns found, count, severity, findings[] {type, category (contact, financial, government-id, personal, network), severity, confidence, masked, placeholder, line, column, detail}, byType, byCategory, summary and redacted. Names and street addresses are not detected. Nothing is stored. Price: $0.002 per call from Exepal credit; not charged if the call fails. Includes free daily calls.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "scan_pii"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoPublic URL to fetch and scan instead of text
textNoText to scan: a transcript, document, form, log, CSV or tool output (up to 2,000,000 characters)
typesNoOnly report these types: email, phone, credit-card, iban, aadhaar, india-pan, us-ssn, uk-nino, nepal-citizenship, passport, date-of-birth, ip-address, crypto-address (default all)
redactNoAlso return `redacted`: the text with every value replaced by its placeholder, e.g. [EMAIL_1], [CARD_1], [PHONE_2] (default false)

Output Schema

NameRequiredDescriptionDefault
urlNoPresent when a url was fetched
countNo
foundNo
statsNo
byTypeNoCounts per type
statusNo
summaryNo
finalUrlNo
findingsNoIn document order, up to 200
redactedNoPresent when redact was true; first 200,000 characters
severityNohigh, medium, low or none
byCategoryNoCounts per category

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new behavior: nothing is stored, URL fetching of a public page, stable placeholder mapping (same value, same placeholder), and full pricing terms ($0.002/call, free on failure, free daily calls). That is meaningful disclosure beyond the annotation set.

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?

Front-loaded with the purpose sentence, then usage, then parameters, then returns and limits — a sensible order. It is dense and long, with some repetition of the type list already in the schema and a return-field inventory that the output schema already covers, so it is slightly over budget.

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?

An agent has everything needed to call it correctly: input mode choice, redaction behavior, type filtering, coverage limits, cost, and data-handling posture. Return values are explained redundantly with the output schema, but nothing material is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds semantics the schema lacks: that the same value maps to the same placeholder across the redacted copy, and that types[] narrows reporting rather than detection. It also frames text/url as mutually alternative input modes.

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?

States a specific verb (finds/redacts) and resource (PII in text or a URL), and enumerates the detected categories including the specific validators used (Luhn, Verhoeff). It is clearly distinguishable from siblings like scan_secrets, scan_injection and scan_rules, which cover different content classes.

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?

Gives concrete when-to-use triggers: before logging, storing, summarising, or sending text to a third-party model, and for auditing a document or tool result. It also gives an explicit boundary — names and street addresses are not detected. It does not, however, name or route to sibling scanners (e.g. scan_secrets for credentials), so the alternative-selection gap keeps it below a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources