Skip to main content
Glama

compare_query_results

Read-only

Compare two read-only SQL query results to verify exact match, including result shape, duplicates, and required order, capturing both results in one snapshot.

Instructions

Compare two read-only query results in one snapshot. The result is proven only when the complete bounded results, duplicates, shape, and required order match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseline_sqlYesBaseline read-only SQL.
candidate_sqlYesCandidate read-only SQL.
compare_orderNo
database_nameNo
parameter_caseNoRequired for parameterized SQL: one named case with exact values and declared SQL types for every parameter.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description adds behavioral context beyond the annotations (readOnlyHint=true, destructiveHint=false) by specifying that results are proven only when complete bounded results, duplicates, shape, and required order match. This clarifies the strictness of comparison, which is valuable and does not contradict annotations.

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 is two sentences long, front-loaded with the primary action, and every word contributes meaningful information. There is no redundant or irrelevant text.

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?

Given the presence of an output schema and annotations, the description sufficiently conveys the tool's purpose and success criteria. Minor gaps remain (e.g., what 'bounded results' means), but overall it is adequate for a tool with this complexity.

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?

The description does not mention any parameters or their semantics. Schema coverage is 60%, with some parameter descriptions present, but the tool description adds no value for understanding parameters 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?

The description clearly states the tool compares two read-only query results in one snapshot. It specifies the exact criteria for proof (complete bounded results, duplicates, shape, and required order), which distinguishes it from sibling tools like compare_query_plans and compare_schemas.

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 conveys clear context: use for comparing read-only query results, and the strict matching criteria imply when results are considered equivalent. It does not explicitly name alternatives or exclusions, but the specificity of 'query results' adequately separates it from schema or plan comparisons.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/akaalholdings/azure-sql-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server