sqlsure Review 2026: Catch Silently-Wrong AI-Generated SQL
sqlsure is a deterministic SQL semantic inspector that flags double-counting, bad joins, and exposed PII in AI-written queries before they run. We review how it works as a CI gate, MCP server, and library.
A query can be perfectly valid, run without error, and return a number that’s silently wrong — revenue double-counted by a join, an average summed, a patient ID exposed. Databases don’t catch it, linters don’t catch it, and an LLM reviewing its own SQL doesn’t catch it. sqlsure does.
What is sqlsure?
sqlsure is a deterministic SQL semantic inspector. You point it at a query and a “rulebook” of facts your team already declared (dbt tests, PK/FK relationships, or a live DB introspection), and it flags semantic errors in about 0.1 ms — before the query runs. It’s built for AI-written SQL in particular, where silently-wrong output is common.
Key features
- Deterministic checks — catches fan-out double-counting, wrong joins, and exposed PII.
- Three doors — a CI gate (exit 1 on violations), an MCP server for agents, and an embeddable library.
- Reuses what you have — dbt tests become grain, relationships become join cardinality, one-line tags mark what’s safe to sum.
- Self-repairing agents — every rejection carries a machine-actionable
fix, so an agent can loop draft → check → fix → check → execute. - Private by default — offline, no data access, no telemetry; it parses query text only.
- Audited — over BIRD + Spider gold answers: 2,568 queries, 45 flags, zero false alarms.
Who should use it?
sqlsure is for anyone shipping AI-written SQL — text-to-SQL products, agent pipelines, or just Claude Code generating reports. Drop it in CI or as an MCP gate so wrong queries never execute. It pairs naturally with dbt-based stacks.
It’s focused on correctness, not performance tuning, and it needs you to declare semantics (even loosely via introspection) before it can judge.
Pros and cons
Pros: catches the bugs linters miss, deterministic and offline, agent self-repair, zero false alarms in its benchmark audit.
Cons: requires declaring semantics; centered on correctness rather than performance; early rulebook (v0.1).
Pricing
Free and open source — install via pip install sqlsure (Apache-2.0).
FAQ
Does sqlsure connect to my database? No. It parses query text only and never accesses data; introspection reads schema metadata (PK/FK), not row data.
Can my agent fix queries automatically? Yes. Each rejection includes a machine-actionable fix; in their benchmark, applying the fix verbatim produced a passing query 10/10 times.
How is it different from a linter? Linters catch syntax and style; sqlsure checks semantics — whether the query computes the right thing given your declared grain and relationships.
Explore the best AI Data tools
Related Articles
Adaptive Recall Review 2026: The Memory System That Learns Which Retrieval Strategy Works Best for Your AI
In-depth review of Adaptive Recall — a hosted memory system for AI applications that goes beyond vector search. Four parallel retrieval strategies, ACT-R cognitive scoring, automatic knowledge graphs, and self-improving ML that learns from your usage patterns.
Best AI Data Tools in 2026: Web Scraping for AI
Explore Crawl4AI and the AI data tool landscape in 2026. How web crawling has evolved to serve LLM pipelines, RAG systems, and AI agents.
Crawl4AI Review: The Web Crawler Built for LLMs and AI Agents
A comprehensive review of Crawl4AI, the open-source web crawler designed to make web data LLM-ready with structured extraction and browser automation.
ParseHawk Review 2026: 100% Local Document AI for Privacy-First Teams
In-depth review of ParseHawk — an open-source, fully local document processing toolkit with API, CLI, and Web UI. Parse documents, chunk for RAG, and ask questions against your corpus without data ever leaving your infrastructure.
Subscribe to the 9bests weekly — get the full list free
Hand-picked AI tool reviews and updates every week. Subscribe to receive this full list + 7 more quick-reference sheets (writing / image / video / audio / chat models / data / API cost).
Subscribe free & get it →Independent reviews — ratings aren't influenced by vendor payments · double opt-in · unsubscribe anytime