Skip to content

feat(mcp_modules): add csvjson community module (lossless CSV<->JSON, strict coercion, receipts) - #23

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
Larslllllll:feat/csvjson-module
Aug 19, 2026
Merged

feat(mcp_modules): add csvjson community module (lossless CSV<->JSON, strict coercion, receipts)#23
ralyodio merged 1 commit into
profullstack:masterfrom
Larslllllll:feat/csvjson-module

Conversation

@Larslllllll

Copy link
Copy Markdown
Contributor

Adds a second community package for #2 (add more community packages): csvjson — lossless CSV ↔ JSON conversion for agents.

What it does

  • Schema inference with widening (null < bool < int < float < str < json), like a spreadsheet import but explicit.
  • Strict coercion: a value that cannot coerce raises SchemaError"abc" in an int column fails loudly instead of becoming NaN or "".
  • Nested objects/arrays flatten to dotted keys (meta.role, tags.0) and expand back losslessly.
  • Union-of-columns protection (the hard part of heterogeneous CSV): blank cells in nested groups are ignored, container keys (tags) never receive scalars, scalar blanks stay real nulls, empty arrays round-trip via the [] marker.
  • Reconciliation receipt on every conversion: rows/fields in→out, missing/added fields, changed cells, null counts, ok flag.

Endpoints

GET /csvjson · POST /csvjson/to-json · POST /csvjson/to-csv · POST /csvjson/schema · POST /csvjson/validate + /tools/csvjson/* tool endpoints with /*/info schemas, mirroring the webhook_verify module pattern.

Quality

  • 28 mocha/chai tests, zero runtime dependencies, Node >= 20.10.
  • Ported from the same core logic as the csvjson-kit product (36-test suite incl. test_heterogeneous.py, test_roundtrip.py): the union-of-columns and empty-array rules are the ones that passed regression testing there.
  • README.md, docs/api.md, examples/basic-usage.js included.
cd mcp_modules/csvjson && npm install && npm test   # 28 passing

… conversion with schema inference, strict coercion and reconciliation receipts
@ralyodio
ralyodio merged commit cc036f8 into profullstack:master Aug 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants