Skip to main content
Glama

Scrub PII

scrub_pii

Scan text for structured PII and secrets, replace matches with [REDACTED], and return a findings list. Removes sensitive identifiers from AI-generated content before sharing.

Instructions

Scan text for structured PII and secrets (emails, UK/US phone numbers, credit-card numbers, US SSNs, UK NI/UTR numbers, database connection strings, and common API-key/credential patterns) via the hosted Lens API. Returns scrubbed text with each match replaced by a generic [REDACTED] marker (the finding TYPE — email, phone_uk, ni_number, etc. — appears only in the findings list, not in the replacement), plus that findings list. It scrubs structured identifiers only: personal NAMES survive, so scrubbed output is not anonymized. Pattern-based server-side scan, no LLM call. Targets structured identifiers — it does not detect personal names or free-form PII, and coverage of structured formats is best-effort, not exhaustive. Requires SOULFIELD_API_KEY.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe text to scan for PII

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.1.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries full burden and succeeds: it discloses that replacement markers are generic [REDACTED], that finding types are only in the findings list, that names survive, that the scan is pattern-based server-side with no LLM call, that coverage is best-effort, and that SOULFIELD_API_KEY is required. This is unusually transparent behavioral 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?

The description is dense and front-loaded, with the core scan behavior stated first and critical caveats (names survive, best-effort, API key) following. There is minor redundancy between 'scrubs structured identifiers only' and 'targets structured identifiers', which prevents a perfect score.

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?

For a one-parameter tool with no output schema, the description is nearly complete: it covers input, output behavior, limitations, auth requirement, and execution model. It lacks precise structure for the findings list, but that does not hinder selection or invocation.

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. The description adds meaning beyond the schema's generic 'The text to scan for PII' by specifying which structured categories the text parameter is scanned for and clarifying that names/free-form PII will not be matched. This modestly exceeds the baseline.

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 states a specific verb ('Scan'), a specific resource ('text' via 'hosted Lens API'), and the exact class of objects detected (structured PII and secrets). It clearly differentiates itself from the validation/consistency-focused sibling tools by emphasizing scrubbed output with [REDACTED] markers and a findings list.

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 gives clear context for when the tool is appropriate: structured identifiers and secrets, not personal names or free-form PII. It explicitly excludes use cases where names must be removed and warns coverage is best-effort. It does not name alternative tools, but no direct scrubbing alternative appears among the siblings.

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

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/mrhpython/lens-mcp'

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