Skip to main content
Glama

anonymize_sql_or_structured_dump

Read-onlyIdempotent

Anonymize PostgreSQL, SQL, CSV, JSONL, and JSON dumps offline with deterministic HMAC-SHA256 mapping while preserving foreign-key joins, NULLs, and checksum-valid IDs.

Instructions

Deterministically anonymizes PostgreSQL COPY ... FROM stdin blocks, SQL INSERT INTO statements, RFC 4180 CSV exports, or JSONL/JSON payloads offline using HMAC-SHA256 token mapping while preserving cross-table FOREIGN KEY joins, \N NULLs, Luhn card checksums, and GB 11643-1999 Mod 11-2 18-digit IDs.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "anonymize_sql_or_structured_dump"
  }
}

Input Schema

NameRequiredDescriptionDefault
formatNoDataset parser mode (defaults to "auto").
contentNoRaw SQL dump (PG COPY or INSERT INTO), CSV, JSONL, or JSON text to sanitize in memory.
filePathNoOptional local path to a .sql, .dump, .csv, .jsonl, or .json file when content is omitted.
filenameNoOptional filename hint (e.g. "pg_seed.sql", "users.csv", "traces.jsonl") for format detection.
emailDomainNoSafe synthetic email domain per RFC 2606 (defaults to "example.test").
sessionSaltNoOptional ephemeral HMAC-SHA256 salt ensuring identical cross-table FOREIGN KEY & UNIQUE pseudonyms.
includeMarkdownReportNoWhen true, attaches a zero-plaintext Markdown compliance certificate alongside sanitizedOutput.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), yet the description still adds real value: determinism, HMAC-SHA256 token mapping, and the specific invariants preserved (FK joins, \N NULLs, Luhn checksums, GB 11643 IDs). It stops short of saying which fields are actually replaced versus passed through, which is the key behavioral question for an anonymizer.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence with no filler, and the verb is front-loaded. It is jargon-heavy and slightly run-on, which costs a little readability, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Seven optional parameters and no output schema mean the description must carry the behavioral weight, and it explains the algorithm and preservation guarantees well. It leaves gaps on what gets substituted, how content versus filePath precedence resolves, and what the caller receives back, so it is adequate rather than complete.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter is already documented, and the description does not clarify any single parameter's semantics beyond naming the accepted formats. Baseline 3 applies when the schema carries the parameter burden.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb (anonymizes) and enumerates the exact resources it accepts: PG COPY blocks, INSERT INTO, RFC 4180 CSV, and JSONL/JSON. It is unambiguous what the tool does, but it never names or contrasts the sibling tools (audit_unmasked_pii_exposure, verify_cross_table_fk_consistency), so an agent must infer the boundary itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: 'offline' and 'in memory' signal that this is a sanitization pass rather than an audit or validation step. There is no explicit when-to-use, when-not-to-use, or statement of prerequisites such as needing a salt for cross-table consistency.

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