Record Batch Gate (Dirtsmith)

v0.1.1
io.github.throttler300/dirtsmith-record-batch-gate Checked 2 days ago Published 18 days ago

Quarantine invalid or duplicate scraper records before an AI agent writes them downstream.

Quarantine invalid or duplicate scraper records before an AI agent writes them to a CRM, database or other downstream tool. One stateless call returns row-specific quarantine codes, composite-key first-valid-wins deduplication, and a canonical batch fingerprint. One-shot CLI: uvx dirtsmith-record-batch-gate < src/record_batch_gate/examples/input.json returns accepted_indices: [0], rejected_indices: [1, 2] with per-row codes (duplicate, type, ...).

Summary extracted from the README.

Record Batch Gate (Dirtsmith) — free MCP tool

Quarantine invalid or duplicate scraper records before an AI agent writes them to a CRM, database or other downstream tool. One stateless call returns row-specific quarantine codes, composite-key first-valid-wins deduplication, and a canonical batch fingerprint.

  • Price: free (MIT). No account, no API key, no telemetry; the tool reads only the arguments you send.
  • Official MCP Registry: io.github.throttler300/dirtsmith-record-batch-gate
  • PyPI: dirtsmith-record-batch-gate
  • Publisher: Dirtsmith

Use it

MCP stdio (any MCP client):

{ "mcpServers": { "record_batch_gate": { "command": "uvx", "args": ["dirtsmith-record-batch-gate", "--mcp"] } } }

One-shot CLI: uvx dirtsmith-record-batch-gate < src/record_batch_gate/examples/input.json

Example arguments:

{"fields": {"id": {"type": "integer", "required": true}, "email": {"type": "string", "max_length": 254}},
 "unique_by": ["id"],
 "records": [{"id": 1, "email": "a@example.com"}, {"id": 1, "email": "b@example.com"}, {"id": "x"}]}

returns accepted_indices: [0], rejected_indices: [1, 2] with per-row codes (duplicate, type, ...).

What it does not do

Top-level field contract only (required/type/enum, numeric min/max, length bounds); no nested JSONPath, fuzzy entity resolution, repair, API writes or PII detection. At most 500 rows, 50 declared fields, 100 fields per row. Full details: src/record_batch_gate/README.md.

Source and tests

src/record_batch_gate/ is the package source (same code as the PyPI release). Tests: cd src/record_batch_gate && python -m unittest -v test_product (needs jsonschema==4.26.0).

Issues and bug reports are welcome in this repo.

License

MIT, Copyright (c) 2026 Dirtsmith. Registry metadata is public domain (CC0) per the registry's terms.