Skip to main content
Glama
idk-arsh
by idk-arsh

check_sql

Validate SQL queries against a schema snapshot to catch non-existent or stale table and column names before running them. Returns close matches for corrections without executing the query.

Instructions

Tables and columns in sql that don't exist in the snapshot, with close matches. Does not run the query.

dialect: bigquery, snowflake, databricks, postgres, duckdb ... (default: the snapshot's).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
dialectNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that the query is not executed and that output includes close matches for unknown identifiers, but it says nothing about snapshot requirements, whether it is read-only by construction, cost/latency, or handling of otherwise-valid-but-unresolvable references.

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 behavior and result shape, then the modifier about non-execution, then parameter guidance. Two short blocks with no filler, though the trailing ellipsis in the dialect list is slightly sloppy.

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 described, and the description covers the essentials for a 2-parameter validation tool: what it reports, that it does not execute, and how dialect resolution works. Nothing needed to invoke it correctly is missing.

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 description coverage is 0%, so the description must compensate. It does so well for 'dialect', listing accepted values (bigquery, snowflake, databricks, postgres, duckdb) and the default of inheriting the snapshot's dialect, which is entirely absent from the schema. The 'sql' parameter needs no further explanation beyond its name.

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 the resource it inspects (tables and columns in sql not present in the snapshot) and the form of the result (close matches), and explicitly rules out execution. The verb 'check' is in the name but not restated, and it distinguishes itself from siblings like describe_table/search_columns by operating on a whole query rather than enumerating schema.

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 line 'Does not run the query' implies this is for static validation before executing, which is useful context, but the description never states when to use this versus list_tables, describe_table, or search_columns, nor any prerequisites for having a snapshot loaded.

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

Deploy Server

Other Tools