Skip to main content
Glama

sqlai.dev SQL Verifier

diff_results

Answer "do these two queries return the same thing?" — the self-check for query refactors. Executes query_a and query_b against identical fresh databases and compares result multisets (order-insensitive; order divergence reported separately when ORDER BY is present). Returns equal:boolean, row counts, and capped row-level diffs (only_in_a / only_in_b).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoOptional seed rows: {"table_name": [{"col": value, ...}, ...]}. Max 10MB total.
engineNoEngine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only.
schemaYesDDL statements.
query_aYesOriginal query.
query_bYesRefactored/alternative query.

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses key behaviors: executes against fresh databases, compares multisets with order-insensitivity, reports order divergence when ORDER BY is present, and returns specific output fields (equal, row counts, diffs). It does not explicitly state read-only nature, but this is implied by the comparison semantics.

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 description consists of two concise sentences and a brief list of return fields. It starts with the core purpose, then covers behavior and output. Every sentence adds unique information without redundancy. Excellent front-loading and no wasted words.

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?

Given no output schema, the description adequately describes the return values (equal, row counts, row-level diffs) and edge-case handling (order divergence). The 5 parameters are explained in the schema and supplemented by description notes. For a comparison tool with moderate complexity, the description is complete enough for an agent to use correctly.

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 the baseline is 3. The description adds value beyond the schema by providing constraints on seed (max 10MB total), clarifying the engine's server/demo scoping, and explaining the purpose of query_a and query_b as 'original' and 'refactored/alternative.' This extra context helps the agent understand parameter usage.

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 uses a clear verb phrase ('Answer do these two queries return the same thing?') and names the specific resource (query comparison). It explicitly frames the tool as a 'self-check for query refactors,' which distinguishes it from siblings like run_sql or validate_sql.

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?

The description states this is for query refactors and explains the execution context (fresh databases, order-insensitive comparison). However, it does not explicitly say when not to use the tool or mention alternatives like manually running both queries via run_sql. The guidance is clear but not exhaustive.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a distinct, non-overlapping purpose: comparing query results, explaining query plans, executing queries singly or in batch, and validating queries without execution. No ambiguity.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern (e.g., diff_results, run_sql, validate_sql). Even run_sql_batch extends the pattern with a clear suffix. No mixed conventions.

Tool Count5/5

With 5 tools, the server is well-scoped for SQL verification without unnecessary bloat. Each tool addresses a core need: execution, comparison, planning, validation, and batch execution.

Completeness5/5

The tool set covers all essential operations for SQL verification: execute, validate, compare, and plan. No obvious missing operations for the stated purpose of verifying and analyzing SQL queries.

Resources