CSV row diff

csv-row-diff · version 1.0.0 · CSV & tables · free, no key needed

Compare two CSV documents with identical headers by unique key tuples and report added, removed, and changed rows.

Use when you need to: csv row diff · diff csv rows by keys · compare keyed csv rows.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "left": "id,name,city\n1,Ada,London\n2,Lin,Paris\n3,Zoe,Berlin\n",
  "right": "id,name,city\n1,Ada,London\n2,Lin,Rome\n4,Bob,Oslo\n",
  "keys": [
    "id"
  ]
}

Response:

{
  "result": {
    "added": "id,name,city\n4,Bob,Oslo\n",
    "removed": "id,name,city\n3,Zoe,Berlin\n",
    "changed": "id,name,city\n2,Lin,Rome\n",
    "counts": {
      "added": 1,
      "removed": 1,
      "changed": 1,
      "unchanged": 1
    }
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "csv-row-diff",
  "version": "1.0.0",
  "input": {
    "left": "id,name,city\n1,Ada,London\n2,Lin,Paris\n3,Zoe,Berlin\n",
    "right": "id,name,city\n1,Ada,London\n2,Lin,Rome\n4,Bob,Oslo\n",
    "keys": [
      "id"
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/csv-row-diff/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":"id,name,city\n1,Ada,London\n2,Lin,Paris\n3,Zoe,Berlin\n","right":"id,name,city\n1,Ada,London\n2,Lin,Rome\n4,Bob,Oslo\n","keys":["id"]}'

The machine-readable contract is at /v1/tools/csv-row-diff/versions/1.0.0.

CLI

node cli.mjs run csv-row-diff 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.