Skip to main content
Glama

sqlai.dev SQL Verifier

run_sql

Execute a SQL query against a fresh ephemeral in-memory database built from your schema (and optional seed rows). Returns real rows (max 500, truncation flagged), column names+types, row_count, and dialect notes. Errors come back as structured JSON with type/position/suggestion — a failed query is a useful answer, not a failure of this tool. Example: schema "CREATE TABLE t(id INTEGER, name TEXT);", query "SELECT name FROM t WHERE id=1", seed {"t":[{"id":1,"name":"ada"}]} → rows [["ada"]].

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoOptional seed rows: {"table_name": [{"col": value, ...}, ...]}. Max 10MB total.
queryYesONE SQL statement to execute. Stacked statements are rejected.
engineNoEngine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only.
schemaYesDDL statements (CREATE TABLE ...; multiple statements allowed).

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries full burden and excels: it discloses ephemeral nature, row limit (500 with truncation flag), return structure (columns, types, count, dialect notes), error format (structured JSON with type/position/suggestion), and provides an example. No behavioral gaps remain.

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 well-structured: purpose first, then return details, error handling, and a concrete example. Every sentence adds value, no fluff. It is appropriately sized for a tool with 4 parameters and moderate complexity.

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?

Despite no output schema, the description fully explains return values (rows, columns, types, row_count, truncation flag, dialect notes) and error behavior. It covers all critical aspects for proper invocation and result interpretation.

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 constraints: seed max 10MB, query must be a single statement, engine defaults to 'sqlite' and 'duckdb' is browser-only. This goes beyond the schema's descriptions.

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 executes a SQL query against an ephemeral in-memory database, specifies the verb ('Execute'), resource ('SQL query'), and environment ('fresh ephemeral in-memory database'). It differentiates from siblings like validate_sql and explain_plan by focusing on execution and result retrieval.

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 description describes what the tool does but lacks explicit guidance on when to use it vs alternatives like run_sql_batch or validate_sql. The usage is implied from context, but no exclusionary or comparative language is provided.

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