Skip to main content
Glama

Run SQL on real PostgreSQL or SQLite

check_sql
Read-onlyIdempotent

Validate SQL statements against in-memory PostgreSQL 18 and SQLite 3.49 engines: load your schema, catch errors with line and hint, inspect rows, and compare dialects.

Instructions

Runs SQL on real PostgreSQL 18 or SQLite 3.49 in memory, after your schema (DDL, migrations, sample INSERTs). Each statement gets the engine's verdict: error with line, column and hint, constraint violations, or the rows it returns (up to max_rows). All inside a rolled-back transaction. dialect both compares the two.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesthe statements to check
schemaNoCREATE TABLE statements, migrations and sample rows, run first
dialectNodefault postgres
max_rowsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds real context beyond them: everything runs 'inside a rolled-back transaction' (no persistent side effects), the engines run in memory, and each statement returns a verdict with line/column/hint or constraint violations. Only the max_rows truncation behavior is mentioned without a default.

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 dense sentences with zero filler. The primary behavior (what it runs on, on what engines) is front-loaded, followed by execution semantics and the dialect comparison.

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?

With annotations and an output schema present, the description needn't explain return values, and it covers scope, transaction safety, and error reporting. It omits only secondary details like the max_rows default and dialect default, which the schema partially covers.

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 75% and the schema already documents dialect's enum and max_rows' bounds. The description nonetheless adds meaning: 'schema' is described as DDL/migrations/sample rows run first, and 'dialect both compares the two' explains the third enum value's semantics beyond the raw enum list.

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?

Specific verb plus resource with concrete engine versions: 'Runs SQL on real PostgreSQL 18 or SQLite 3.49 in memory.' It immediately conveys the validation/execution purpose and that the schema is applied first, so an agent knows exactly what the tool does.

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?

Usage is implied rather than stated: the description frames the tool as running statements after a schema (DDL/migrations/sample INSERTs) and hints that 'dialect both compares the two.' There are no siblings to disambiguate against and no explicit when-not guidance, so this sits at implied-usage level.

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