Skip to main content
Glama

sqlai.dev SQL Verifier

explain_plan

Return the engine-native query plan for a query (SQLite: EXPLAIN QUERY PLAN) plus full-table-scan warnings. Use it to check whether an index would be used before recommending one. Example: "SELECT * FROM orders WHERE status=?" on an unindexed column → plan ["SCAN orders"], warning about the full scan.

Input Schema

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

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that the tool returns a plan and warnings, and notes the limitation that 'duckdb' only works in browser demo. However, it does not explicitly state that the tool is read-only or idempotent, which is implied but not confirmed.

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?

Two sentences and an example, all front-loaded with the main purpose. Every sentence adds necessary information without verbosity.

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 the moderate complexity (3 params, no output schema, no annotations), the description fully covers how to use the tool, what it returns (with example output), parameter details, and a notable limitation (duckdb scope). It is complete for effective use.

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 baseline is 3. The description adds value by clarifying 'query' is a single SQL statement, explaining 'engine' default and limitation, and emphasizing 'schema' must include indexes. The example further illustrates 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 clearly states the tool returns the engine-native query plan and full-table-scan warnings, specifying the verb 'return' and resource 'engine-native query plan'. It distinguishes itself from siblings like 'run_sql' and 'validate_sql' by focusing on plan analysis rather than execution or validation.

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?

Explicitly states 'Use it to check whether an index would be used before recommending one.' and provides a concrete example illustrating when to use. This gives clear guidance on the tool's intended use case, effectively differentiating it from sibling tools.

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