A deterministic semantic checker that catches silently-wrong AI-generated SQL — double-counted joins, summed averages, exposed PII — in 0.1 ms before the query runs, with machine-actionable fixes.
A deterministic semantic checker that catches silently-wrong AI-generated SQL — double-counted joins, summed averages, exposed PII — in 0.1 ms before the query runs, with machine-actionable fixes.
sqlsure exists for the failure mode nothing else catches: a SQL query that is perfectly valid, runs without error, and returns a number that is silently wrong — revenue double-counted by a one-to-many join, an average summed, a patient identifier exposed. Databases, linters, and LLMs reviewing their own SQL all miss this class of bug. sqlsure catches it deterministically, in about 0.1 milliseconds, before the query executes, by judging SQL against facts your team already declared: dbt unique tests become table grain, relationships tests become join cardinality, and one-line meta tags mark which measures are safe to sum. Rules are dictionary lookups, not LLM calls — same input, same verdict, every time, fully offline, with no data access (it parses query text and never connects to a database) and no telemetry. Nine rules cover fan-out and chasm-trap double counting, non-additive and semi-additive aggregation, undeclared or keyless joins, cross joins, silently re-weighted averages, and sensitive-column exposure. Every rejection carries a machine-actionable fix, enabling AI agents to self-repair in a draft-check-fix-check-execute loop; in the project's benchmark, applying the fix verbatim produced a passing query 10 out of 10 times. MCP support is prominent: sqlsure ships an MCP server (claude mcp add sqlsure -- python -m sqlsure.mcp_server) so your AI agent must pass inspection before executing SQL, plus a CI gate CLI, an embeddable Python library, and a single-file Agent Skill. Validated on 2,568 Spider and BIRD gold queries with 45 flags and zero false alarms. Apache-2.0, pip install sqlsure.
Was this helpful?
Feature information is available on the official website.
View Features →$0 (self-hosted)
Ready to get started with sqlsure?
View Pricing Options →Weekly insights on the latest AI tools, features, and trends delivered to your inbox.
No reviews yet. Be the first to share your experience!
Get started with sqlsure and see if it's the right fit for your needs.
Get Started →Take our 60-second quiz to get personalized tool recommendations
Find Your Perfect AI Stack →Explore 20 ready-to-deploy AI agent templates for sales, support, dev, research, and operations.
Browse Agent Templates →