Skip to main content
Glama

gulliver_diff

Read-only

Compare two queries or tables by key to find missing, extra, or changed rows, proving refactors and migrations preserve the same data across connections.

Instructions

Data diff: do two queries or tables return the same rows? Compares by key inside the engine (hashed buckets, scales to billions of rows), then lists sample keys that are missing, extra or changed. Sides may be on different connections. Both queries are priced first; over budget it returns status block instead of running. Use it to prove a refactor or migration keeps the same rows; use gulliver_drift for schema changes, gulliver_check for rules on one table.

Input Schema

NameRequiredDescriptionDefault
keyYesColumn(s) that identify a row.
leftYesLeft query or table name (e.g. the current model).
rightYesRight query or table name (e.g. the refactored model).
columnsNoOnly compare these columns (key always included). Omit to compare all shared columns.
connectionNoConnection name as listed by gulliver_status (from gulliver.toml or GULLIVER_DSN). Omit for the default connection.
right_connectionNoConnection for the right side, if different.

Output Schema

NameRequiredDescriptionDefault
statusYes
next_stepYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.1
    • changedInput schema / properties / columns / description
      Previous value: -"Column names."New value: +"Only compare these columns (key always included). Omit to compare all shared columns."
    • changedInput schema / properties / connection / description
      Previous value: -"Connection name from gulliver_status. Omit for the default."New value: +"Connection name as listed by gulliver_status (from gulliver.toml or GULLIVER_DSN). Omit for the default connection."
  2. Changed3 schema fields changedv0.1.1
    • addedOutput schema / properties
      Added value: +{
      +  "next_step": {
      +    "type": "string"
      +  },
      +  "status": {
      +    "enum": [
      +      "ok",
      +      "warn",
      +      "block",
      +      "needs_rehearsal",
      +      "needs_approval",
      +      "skipped",
      +      "fail",
      +      "error"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "status",
      +  "next_step"
      +]
    • changedOutput schema / title
      Previous value: -"gulliver_diffDictOutput"New value: +"GulliverResult"
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish read-only and non-destructive, but the description adds substantial context the annotations cannot convey: comparison happens by key inside the engine via hashed buckets and scales to billions of rows, the two sides may live on different connections, and both queries are priced first so an over-budget run returns a status block rather than executing. That cost-gating behavior is critical for an agent to know before calling.

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?

Front-loaded with the core question and then ordered from mechanism to outputs to budget behavior to sibling routing. The parentheticals ('hashed buckets, scales to billions of rows') are informative but make the first sentence dense; overall every sentence carries weight with no filler.

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?

An output schema exists, so return values need not be enumerated, and the description still sketches what comes back (sample keys missing/extra/changed, or a status block when over budget). For a 6-parameter read-only diff tool with full schema coverage, nothing an agent needs to call it correctly 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 including key, columns, connection and right_connection is already documented in the schema. The description reinforces that comparison is keyed and that sides may be on different connections, which explains why right_connection exists, but adds no format or syntax detail beyond the schema. Baseline 3 is appropriate.

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?

Opens with a specific verb+resource framed as a question ('Data diff: do two queries or tables return the same rows?') and immediately names what it produces (sample keys missing, extra or changed). It is unambiguously distinct from gulliver_drift and gulliver_check, which are called out by name.

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

Usage Guidelines5/5

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

Explicitly states the intended use case ('prove a refactor or migration keeps the same rows') and routes the agent to the correct siblings for adjacent needs: gulliver_drift for schema changes, gulliver_check for rules on a single table. This is textbook when-to-use/when-not-to-use guidance.

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