Skip to main content
Glama

API Keg — Document Redline & Table Diff

Compare Two Structured CSV or JSON Tables by Primary Key

diff_tables
Read-onlyIdempotent

Compares 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

NameRequiredDescriptionDefault
afterYesTable 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.
beforeYesTable 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.
primaryKeyYesSingle primary-key column name (e.g. "sku") or composite primary-key column list (e.g. ["sku", "region"]).
csvDelimiterNoSingle-character column delimiter used when before or after is a CSV string (default ',').,
ignoreFieldsNoOptional column names (such as "updated_at" or "etag") to exclude from cell comparison.
coerceCsvTypesNoAutomatically parse unquoted numeric and boolean literals in CSV cells while preserving leading-zero identifiers.
numericToleranceNoOptional non-negative tolerance; numeric cell differences with |delta| <= numericTolerance are treated as unchanged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful context: the exact shape of the return payload (counts, added/removed rows, cell-level diffs, numericDelta) and the per-call pricing model with an x402 micropayment, which is behavior an agent cannot get from annotations.

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?

Two sentences, front-loaded with the core operation before the operational details. The pricing sentence is somewhat promotional but carries actionable information (cost per diff), so little is wasted.

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

Completeness4/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 return components. Pricing, dry-run validation, and the input formats are all covered. Minor gaps remain around limits on dataset size and error behavior, but nothing critical for correct invocation is missing.

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

Parameters3/5

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

Schema coverage is 100%, so every parameter is already documented in the input schema, including composite primaryKey and numericTolerance. The description restates the single-or-composite primaryKey concept and the numericDelta outcome but adds no syntax or format detail beyond what the schema supplies, making the baseline 3 appropriate.

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

Purpose4/5

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

The description names a specific verb (compares) and resource (two JSON object arrays or RFC 4180 CSV strings), plus the keying mechanism and the returned diff components. It is unambiguous what the tool does, though it never references the sibling diff_documents to draw the boundary between them.

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

Usage Guidelines3/5

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

Usage is implied by the purpose statement and the note that a dry run validates schema, but there is no explicit when-to-use/when-not-to-use guidance and no mention of how this differs from diff_documents. An agent must infer the selection criteria.

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