Skip to main content
Glama
multivon-ai

multivon-mcp

Official
by multivon-ai

eval_pii_detection

Scan LLM output for PII (emails, SSNs, credit cards) using regex patterns, including jurisdiction-specific sets and custom rules. Returns a compliance score and flags matches with optional redaction.

Instructions

Detect personally-identifiable information (PII) in an LLM output.

Local-first: zero API calls. Uses a regex pattern library covering emails, phone numbers, SSNs, credit cards, IBANs, IPs, addresses, and jurisdiction-specific identifiers (HIPAA MRNs, EU VAT, California bank accounts, etc).

Score 1.0 = no PII detected. Score 0.0 = PII found (the reason field lists which types matched and example substrings).

Args: output: The LLM-generated text to scan. jurisdiction: Which extra pattern set to include. One of "all" (default), "gdpr", "ccpa", "pipeda", "hipaa", or "dpdp" (India). custom_patterns: Optional dict of {name: regex} to add to the default library (e.g. {"employee_id": r"EMP-\d{6}"}). redact: If True, replace matched substrings with [REDACTED-TYPE] markers in the reason field.

Returns: {"score": 0.0 or 1.0, "passed": bool, "reason": str, "threshold": float, "evaluator": "pii_detection"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outputYes
redactNo
jurisdictionNoall
custom_patternsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description shoulders the full transparency burden, and it succeeds. It discloses local execution, score semantics, reason-field content, redaction behavior, jurisdiction handling, and custom pattern support. It also documents the exact return shape, so an agent can predict the tool's behavior accurately.

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?

The description is detailed but well-organized: a one-sentence purpose, a concise behavioral note, then Args/Returns sections. Every sentence adds useful information, and the most important decision-relevant details are front-loaded.

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?

The description is fully complete for this tool's complexity. It covers all four parameters, the output schema fields, scoring behavior, privacy characteristics, and extension points. Even though an output schema exists, the description adds decision-relevant context such as the threshold/evaluator fields and jurisdiction semantics.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate, and it does extensively. It explains what 'output' is scanned, enumerates every jurisdiction value, gives a concrete custom_patterns example, and clarifies the effect of redact. This adds substantial meaning beyond the bare schema properties.

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 opens with a specific verb and resource: 'Detect personally-identifiable information (PII) in an LLM output.' It also clarifies the local-first scope and defines the 1.0/0.0 scoring meaning, making it clearly distinct from sibling eval tools such as eval_toxicity or eval_schema_compliance.

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 to use the tool: whenever PII detection in LLM output is needed, with a strong signal that it is suitable for privacy-sensitive cases because it is local-first and makes zero API calls. It does not explicitly name alternatives or state when-not-to-use it, so it stops short of a 5.

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