- Sqlai.dev Sql Verifier
Sqlai.dev Sql Verifier
Don't trust the SQL. Run it.
Every LLM can write SQL. None of them can know it's correct. Paste a schema and a query — this page spins up a real in-memory database in your browser and executes it. Real error messages, real results, zero guessing. Nothing leaves your machine.
<div class="panes">
<div class="pane">
<label for="schema">schema (DDL)</label>
<textarea id="schema" spellcheck="false" autocomplete="off"></textarea>
</div>
<div class="pane">
<label for="seed">seed rows <span class="muted">(optional JSON)</span></label>
<textarea id="seed" spellcheck="false" autocomplete="off"></textarea>
</div>
<div class="pane pane-query">
<label for="query">query</label>
<textarea id="query" spellcheck="false" autocomplete="off"></textarea>
<div id="query-b-wrap" hidden>
<label for="query-b">query B <span class="muted">(diff compares result sets)</span></label>
<textarea id="query-b" spellcheck="false" autocomplete="off"></textarea>
</div>
</div>
</div>
<div class="results" id="out" aria-live="polite">
<p class="hint">press <kbd>RUN</kbd> (or Ctrl+Enter) — the preloaded query has a bug an LLM would happily ship</p>
</div>
<p class="api-link"><a href="/docs/">API: verify programmatically →</a></p>
// for AI agents
The same engine runs as a paid MCP server. Your agent writes SQL; sqlai.dev executes it in an ephemeral sandbox and returns ground truth — rows, typed errors with positions and suggestions, query plans, or a result-set diff. Per-call payment over x402, no account, no API key. 20 calls/day free so agents can try before their operators approve spend.
<div class="table-wrap">
<table class="price-table">
<thead><tr><th>tool</th><th>what it returns</th><th>price</th></tr></thead>
<tbody>
<tr><td><code>run_sql</code></td><td>rows (≤500), columns+types, row_count, dialect notes</td><td>$0.005</td></tr>
<tr><td><code>validate_sql</code></td><td>ok / typed error with position + suggestion, referenced tables</td><td>$0.003</td></tr>
<tr><td><code>explain_plan</code></td><td>engine-native query plan, full-scan warnings</td><td>$0.003</td></tr>
<tr><td><code>run_sql_batch</code></td><td>up to 10 isolated run_sql results</td><td>$0.02</td></tr>
<tr><td><code>diff_results</code></td><td>are two queries' result sets equal? row-level diff</td><td>$0.008</td></tr>
</tbody>
</table>
</div>
<p>Add it to your agent:</p>
<pre class="snippet"><code>{
"mcpServers": { "sql-verifier": { "type": "http", "url": "https://mcp.sqlai.dev/mcp" } } }
Server-side engine is SQLite (same WASM build as this page). DuckDB verification is browser-only for now — Worker size limits, documented honestly in the docs.
服务器配置
{
"mcpServers": {
"sql-verifier": {
"type": "http",
"url": "https://mcp.sqlai.dev/mcp"
}
}
}