Compare spreadsheets
compare_spreadsheetsUse this when the user has two versions of the same spreadsheet (CSV or Excel: price list, inventory, roster, budget, product catalog, CRM export) and wants to "compare two excel files", "compare two spreadsheets", "find the differences between two csv files", "what changed between these files" or "list what changed". Matches rows by a key column it detects (or key_columns), lists all added, removed and changed rows with each changed cell old -> new, numeric change and percent, plus renamed/moved columns and key changes, and returns an Excel workbook (Summary, Changed, Cell changes, Added, Removed, annotated new version) and a changes CSV. Does not merge or join two different tables (e.g. customers + orders), does not compare Word or PDF documents, and does not edit either file.
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": "compare_spreadsheets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_file | No | The NEWER version (CSV, TSV or Excel .xlsx), e.g. pricelist_2026Q4.xlsx or roster-october.csv. | |
| old_file | No | The OLDER version (CSV, TSV or Excel .xlsx), e.g. pricelist_2026Q3.xlsx or roster-september.csv. | |
| new_sheet | No | Sheet (tab) to read from the new workbook, e.g. Prices Q4. | |
| new_table | No | Instead of new_file: the newer version pasted as CSV/TSV text with a header row, e.g. "SKU,Price\nA1,10.50\nC3,7.00". | |
| old_sheet | No | Sheet (tab) to read from the old workbook, e.g. Prices Q3. Default: the sheet with the same name as in the new workbook, else the first sheet with data. | |
| old_table | No | Instead of old_file: the older version pasted as CSV/TSV text with a header row, e.g. "SKU,Price\nA1,10.00\nB2,5.00". | |
| column_map | No | Old column name -> new column name for renamed columns, e.g. {"Unit Price": "Price (USD)"}. Turns off automatic rename detection. | |
| ignore_case | No | Treat ABC and abc as equal, e.g. true. Default false. | |
| key_columns | No | Column(s) that identify a row, to override the automatic key, e.g. ["SKU"] or ["Store", "Product code"]. | |
| header_row_new | No | Row number of the column headings in the new file, e.g. 3. | |
| header_row_old | No | Row number of the column headings in the old file when it is not detected, e.g. 3 when two title rows come first. | |
| ignore_columns | No | Columns to leave out of the comparison, e.g. ["Last updated", "Notes"]. | |
| normalize_dates | No | Compare dates by calendar day, so 2026-03-05, 3/5/2026 and an Excel date serial are equal, e.g. true (default). | |
| trim_whitespace | No | Ignore leading/trailing and repeated spaces, e.g. true (default). | |
| numeric_tolerance | No | Numbers that differ by this much or less count as equal, e.g. 0.01 to ignore rounding by a cent. Default 0. | |
| detect_key_changes | No | Report a removed row and an added row whose other values are identical as one key change (e.g. a SKU renumbered), e.g. true (default). | |
| compare_row_numbers | No | Compare a running row-number column (#, Row, No.: 1, 2, 3...) like any other column, e.g. true. Default false: it shifts whenever a row is inserted, so it is skipped with a note. | |
| compare_numbers_as_values | No | Compare numbers by value so "1,200.00" equals 1200, e.g. true (default). Codes with leading zeros (00123) stay text. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| files | Yes | ||
| notes | Yes | ||
| counts | Yes | ||
| columns | Yes | ||
| by_column | Yes | ||
| downloads | Yes | ||
| added_preview | Yes | ||
| complete_list | Yes | ||
| excluded_rows | Yes | ||
| biggest_changes | Yes | ||
| changes_preview | Yes | ||
| removed_preview | Yes | ||
| key_changes_preview | Yes |