Compare Two Structured CSV or JSON Tables by Primary Key
diff_tablesCompares two JSON object arrays or RFC 4180 CSV strings keyed by a single or composite primaryKey, returning exact summary counts, added rows, removed rows, and cell-level modified diffs with exact decimal numericDelta. Pricing: $0.002 USD per structured table or catalog diff (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.
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": {
"before": "<before>",
"after": "<after>",
"primaryKey": "<primaryKey>"
},
"name": "diff_tables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| after | Yes | Table dataset passed either as a JSON array of row objects (e.g. [{"sku":"A1","region":"US","price":49.99}]) or an RFC 4180 CSV string with a header row. | |
| before | Yes | Table dataset passed either as a JSON array of row objects (e.g. [{"sku":"A1","region":"US","price":49.99}]) or an RFC 4180 CSV string with a header row. | |
| primaryKey | Yes | Single primary-key column name (e.g. "sku") or composite primary-key column list (e.g. ["sku", "region"]). | |
| csvDelimiter | No | Single-character column delimiter used when before or after is a CSV string (default ','). | , |
| ignoreFields | No | Optional column names (such as "updated_at" or "etag") to exclude from cell comparison. | |
| coerceCsvTypes | No | Automatically parse unquoted numeric and boolean literals in CSV cells while preserving leading-zero identifiers. | |
| numericTolerance | No | Optional non-negative tolerance; numeric cell differences with |delta| <= numericTolerance are treated as unchanged. |