Skip to main content
Glama

CSV Diff by Key

csv_diff
Read-onlyIdempotent

Compare two CSV extracts of the same records (before and after, header row first, up to 14,000 characters each and together within the 30,000-byte request) by a key column, or up to 3 key columns together. Get back the rows added, removed and changed (with the key, the line in each file and the names of the columns whose values changed), the count of unchanged rows, and the columns added or removed. Options: columns to ignore (e.g. an updated_at stamp), trim spaces, and compare numbers by value (1.50 = 1.5). Data cell values are never echoed back; only key values and column names are. Answer fields: ok, verdict, result, rule, does_not, sources, observation, signature, verify. Errors: ok false with the reason (bad input, too large, hourly limit). Free. No model, no network, nothing you send is stored by the tool, and every answer is signed with LLPRO's key (check it at https://llpro.ai/csv-diff). Not legal, tax or financial advice.

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>",
      "key": "<key>"
    },
    "name": "csv_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe key column name, or up to 3 names that together identify a row (in both headers). Use a record code (order, invoice, SKU), not a person's name: key values are echoed back.
afterYesThe newer CSV text, header row first, same delimiter, up to 14,000 characters.
beforeYesThe older CSV text, header row first (RFC 4180), up to 14,000 characters. Do not send personal data (names of people, emails, phone, Social Security, card or account numbers): columns named for it and cells shaped like it are refused, but names in cells cannot be detected.
delimiterNoField separator for both files: comma (default, RFC 4180), semicolon, tab or pipe.comma
trim_spacesNotrue: spaces, tabs and line breaks at either end of every cell (keys too) are ignored. Default false: they count (RFC 4180 rule 4).
ignore_columnsNoColumns not to compare (up to 50), e.g. a last-modified stamp.
numbers_by_valueNotrue: two cells that are both XSD decimals (12, -3.50, +.5; spaces at either end ignored, as XSD whiteSpace collapse) are equal when their values are equal (1.50 = 1.5 = 01.5). Default false: text compared exactly.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/idempotent/non-destructive annotations, it discloses that cell values are never echoed back (only keys and column names), that personal-data-shaped columns and cells are refused, that there is an hourly limit and a size cap, and that responses are signed. These are exactly the behavioral constraints an agent needs before sending data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core comparison is front-loaded, followed by options, output fields, and error modes in a logical order. It is dense and slightly run-on, and the closing trust/legal sentence is marginal, but little of it is genuinely wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description compensates by enumerating the answer fields (ok, verdict, result, rule, sources, observation, signature, verify) and the failure modes (bad input, too large, hourly limit). For a seven-parameter, three-required tool this covers what an agent needs to call and interpret it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: ignore_columns gets a motivating example, numbers_by_value is explained with 1.50 = 1.5, trim_spaces is tied to the RFC 4180 default, and key warns that key values are echoed back so a record code should be used.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: compare two CSV extracts of the same records (before/after) by a key column or up to three key columns, and return added, removed and changed rows. It also names the exact outputs (added/removed/changed rows, unchanged count, added/removed columns), so an agent can tell precisely what this does versus a schema validator like csv_schema_check.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clear: before/after extracts of the same records, header row first, keyed by a record code rather than a person's name. It gives concrete guidance on options (ignore an updated_at stamp, trim spaces, numeric comparison) but names no explicit alternative tool or when-not-to-use condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources