Skip to main content
Glama
altirs

@altirs/mcp-server

by altirs

Detect and mask personal data (PII)

detect_pii
Read-onlyIdempotent

Scan text for personal data such as emails, phone numbers, IDs, and addresses, and get a masked copy with entities redacted. Prevent PII leaks before logging or sharing content.

Instructions

Find personally identifiable information in text — emails, phone numbers, government IDs, IBANs/card numbers, addresses, names — and optionally return a masked copy with each entity redacted. Use this before logging, storing, sending text to a third party, or including user-supplied content in a response. Returns found (boolean), the list of PII entities (type, severity, description) and, when mask is true, maskedText that is safe to pass on. Prefer the masked text over the original whenever PII is present.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maskNoWhen true (default), also return `maskedText` with every detected entity redacted.
textYesThe text to scan for personal data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, the description discloses the return shape (found, entities with type/severity/description, maskedText), the masking behavior controlled by the mask parameter, and that maskedText is safe to pass on. This gives the agent a clear behavioral model without contradicting annotations.

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?

Three sentences with no filler: purpose and scope, usage context, and return behavior. The most important guidance is front-loaded, and the final sentence ('Prefer the masked text...') is actionable and relevant.

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?

Given the small parameter set, rich annotations, and full schema coverage, the description covers everything needed to invoke the tool correctly: what it detects, when to use it, what it returns, and how to handle the masked output. No output schema exists, but the description compensates by listing the return fields.

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 value by explaining the effect of mask=true ('also return maskedText with every detected entity redacted') and by clarifying that text is the content to scan, slightly enriching the schema descriptions.

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 ('Find') and resource ('personally identifiable information in text'), enumerates concrete entity types, and clearly differentiates from sibling tools like check_content and scan_injection by focusing on PII detection and masking. The optional masking behavior is also made explicit.

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 explicit use cases: 'before logging, storing, sending text to a third party, or including user-supplied content in a response.' It does not name alternatives or when-not-to-use, but the sibling tools are clearly different categories, so the context is sufficient.

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