Skip to main content
Glama

table_diff

Read-only

Compare two tables or environments and return structured schema/row differences.

Instructions

Compare two tables or environments and return structured schema/row differences.

When comparing environments, pass select_models to choose the models to compare. SQLMesh's console output is suppressed because MCP clients receive the JSON result.

Input Schema

NameRequiredDescriptionDefault
onNo
limitNo
whereNo
sourceYes
targetYes
skip_columnsNo
select_modelsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true and the description is consistent with a read-only comparison. It adds genuinely non-obvious behavior: console output is suppressed and the MCP client receives JSON. It does not explain what the 'differences' contain, how row-level comparison keys work, or how mismatched schemas are reported.

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 short sentences with the core action front-loaded and no filler. The trailing note about suppressed console output is mildly tangential but does carry real information, so nothing is seriously wasteful.

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

Completeness2/5

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

With 7 parameters, 0% schema coverage, no output schema, and only a readOnly annotation, the description carries most of the burden and does not meet it. Key semantics (what `source`/`target` accept, what `on`/`where`/`skip_columns` do, output shape) are unaddressed for a fairly complex comparison tool.

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

Parameters2/5

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

Schema description coverage is 0% across 7 parameters, so the description must compensate. It explains only `select_models` ('choose the models to compare'); `on`, `where`, `skip_columns`, `limit`, `source`, and `target` are left entirely unexplained, including whether `on` is a join key for row comparison.

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?

States a specific verb and resource: 'compare two tables or environments and return structured schema/row differences.' That is clear and concrete. However, it does not distinguish itself from the sibling tool `diff_environment`, which appears to cover overlapping ground (environment comparison), so an agent cannot tell from this text alone which one to pick.

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?

The second sentence gives a conditional instruction ('When comparing environments, pass select_models'), which is a usage hint. But there is no statement of when to use table_diff versus diff_environment, list_environments, or fetch_model_data, and no prerequisites or exclusions are stated.

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