Skip to main content

Module pii_tokenizer

Module pii_tokenizer 

Source
Expand description

PII (Personally Identifiable Information) tokenization for data privacy.

Automatically detects and tokenizes sensitive data before MCP tool calls, preventing PII from entering model context or being logged.

Features:

  • Pattern-based detection (email, phone, SSN, credit card, etc.)
  • Secure token generation and storage
  • Automatic de-tokenization on tool result
  • Configurable patterns and policies
  • Audit trail of tokenized data

Structs§

DetectedPii
Detected PII instance with location and type.
PiiToken
Token for replacing PII.
PiiTokenizer
Manager for PII tokenization with configurable detection patterns.

Enums§

PiiType
Types of PII that can be tokenized.