Skip to main content
Glama
elekto-com-br

Elekto MCP for SQL Server

Official

Compare two databases

compare_schemas
Read-onlyIdempotent

Compare table and column structure across two configured databases to find missing tables, missing columns, and type or nullability differences for migration checks or schema drift detection.

Instructions

Compares the table and column structure of two configured databases, such as development and production: tables present in only one, columns present in only one, and columns whose type or nullability differ, each with its type_declaration so a difference reads as 'nvarchar(250) vs nvarchar(50)'. Use it to check a migration or detect drift. It compares tables and columns only, not views, code, indexes or data; to see one differing table in full, call get_table_schema on each database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_schemaNoSource schema filter. Empty means every schema.
target_schemaNoTarget schema filter. Empty means every schema.
source_databaseYesSource database name as registered in configuration.
target_databaseYesTarget database name as registered in configuration.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so safety is covered; the description adds real behavioral context by scoping the comparison to tables and columns and by disclosing that differences carry a type_declaration rendered as 'nvarchar(250) vs nvarchar(50)'. It does not describe pagination, output size, or how large diffs are presented, keeping it short of a 5.

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

Conciseness5/5

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

The core action and its diff categories are front-loaded, then usage, then scope exclusions and the alternative. Dense but every clause carries information, including the illustrative type_declaration example.

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 explaining exactly what the result contains (one-sided tables, one-sided columns, type/nullability mismatches with type_declaration). Combined with the explicit scope boundary and the handoff to get_table_schema, an agent has everything needed to call it correctly.

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 description coverage is 100%, with source/target_database and the empty-means-every-schema filters fully documented in the schema, so the baseline is 3. The description mentions 'two configured databases' but adds no format or constraint detail beyond what the schema already provides.

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?

Names a specific verb (compares) and resource (table and column structure of two configured databases) and enumerates the exact diff categories it produces. An agent can distinguish it from siblings like get_table_schema or get_schema_summary without opening a schema.

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?

States when to use it ('check a migration or detect drift'), what it explicitly does not cover ('tables and columns only, not views, code, indexes or data'), and routes the agent to a named alternative ('to see one differing table in full, call get_table_schema on each database'). This is explicit when/when-not/alternative guidance.

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