What is PII Detection (Agent)?
Detecting personally identifiable information in MCP tool call arguments or responses to prevent AI agents from inadvertently exfiltrating, processing, or exposing personal data across trust boundaries.
WHY IT MATTERS
AI agents are powerful data processors, and that is precisely the problem. An agent querying a database, reading files, or calling APIs routinely encounters personally identifiable information — names, email addresses, phone numbers, national insurance numbers, financial details. Without PII detection, this data flows freely through the agent's context and into subsequent tool calls.
The risk is not that agents deliberately exfiltrate PII — it is that they do so incidentally. An agent asked to 'summarise the customer database' may include PII in its summary. An agent debugging an error may pass a stack trace containing user data to a logging tool. An agent generating a report may include names and emails that should have been anonymised. Each instance is a potential data protection violation.
Under GDPR, CCPA, and similar regulations, PII processing must be lawful, limited, and accountable. An agent processing PII without explicit purpose, passing it across system boundaries without controls, or storing it in context windows without consent violates these principles. The regulatory exposure is real — data protection authorities have the power to impose substantial fines.
PII detection at the tool interaction layer catches personal data before it crosses trust boundaries. Arguments containing PII can be blocked or redacted before reaching MCP servers. Responses containing PII can be filtered before entering the agent's context. This provides a technical control that maps directly to regulatory requirements.
HOW POLICYLAYER USES THIS
Intercept supports PII detection through argument validation and output filtering policies. YAML policies can define patterns that match common PII formats — email addresses, phone numbers, national insurance numbers, credit card numbers — and deny or redact tool calls containing these patterns. This enforcement happens at the proxy layer, providing a consistent PII boundary regardless of which MCP server or tool is involved. Audit logs record PII detection events for compliance reporting.