Skip to main content
Glama

sqlai.dev SQL Verifier

validate_sql

Validate a SQL query against a schema WITHOUT executing it (parse + name/type binding via EXPLAIN). Returns ok with referenced tables, or a structured error: {type: unknown_column|unknown_table|syntax|..., message, position, suggestion}. The suggestion is rule-based (edit distance against your schema). Example: query "SELECT nmae FROM users" → error type unknown_column, suggestion 'did you mean "name"?'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesONE SQL statement to validate.
engineNoEngine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only.
schemaYesDDL statements.

TDQS

A4.6/5.0
Behavior5/5

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

No annotations provided, so description fully covers behavior: parsing via EXPLAIN, returning structured errors with type, message, position, suggestion. It explains the suggestion is rule-based (edit distance) and gives an example, leaving no ambiguity.

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?

Description is a single efficient paragraph with clear structure, includes an illustrative example, and no wasted text. Could be slightly more structured but effective.

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?

No output schema exists, but description thoroughly explains the return format, including error types and suggestion logic. It covers all essential aspects for a validation tool, providing complete context.

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 covers all parameters (100%), so baseline 3. Description adds value by specifying query is 'ONE SQL statement', detailing engine defaults and limitations, and clarifying schema is DDL statements.

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 validates SQL without executing it, using a specific verb 'validate'. It distinguishes from siblings like run_sql and run_sql_batch which execute queries.

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 explicitly notes it does not execute, implying use for validation only. It mentions engine constraints (duckdb only in browser demo), providing clear context. Could be more explicit about when not to use, but the sibling names help.

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