sqltwin_stream_anonymize
Anonymizes PostgreSQL and MySQL SQL dumps by replacing PII with synthetic values while preserving foreign key joins, referential integrity, and unique constraints for staging or test copies.
Instructions
Streams and anonymizes PostgreSQL and MySQL database dumps, replacing PII (emails, phone numbers, names, IBANs) with synthetic values using HMAC format-preserving encryption while preserving 100% of foreign key joins, relational referential integrity, and unique constraints. Use when: Preparing staging or developer test database copies from production SQL dumps without exposing real user identities. Do not use when: Parsing financial SEC EDGAR filings or classifying IP addresses. Alternative: Use edgarpulse_parse_filing for SEC regulatory filings, or cidr_shield_lookup for IP address classification. Execution: Runs locally in-memory (<10ms), deterministic, zero network calls, zero telemetry, air-gapped deterministic.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sqlContent": "<sqlContent>"
},
"name": "sqltwin_stream_anonymize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| licenseKey | No | Optional TopAI Sovereign Pro offline license key (or set TOPAI_LICENSE_KEY env variable). | |
| secretSalt | No | Optional cryptographic HMAC salt for deterministic pseudonymization (default: 'mcp-salt'). | |
| sqlContent | Yes | Raw SQL dump content containing CREATE TABLE, COPY, or INSERT statements. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| anonymizedSql | Yes | Sanitized SQL content with preserved referential integrity. | |
| rowsProcessed | Yes | Total count of SQL data rows parsed and anonymized. |