sqlai.dev SQL Verifier

Executes SQL in a real ephemeral database: rows, typed errors with suggestions, plans, diffs.

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
100%
命名品質
92%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

根據工具定義與協定合規性的自動化分析。

上下文成本

~1,218Token(工具定義)
~1.8 KB典型回應大小
中等的注意力影響(128k 上下文的 0.95%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "sqlai-dev-sql-verifier": {
      "url": "https://mcp.sqlai.dev/mcp"
    }
  }
}

遠端端點

https://mcp.sqlai.dev/mcpstreamable-http

它能做什麼

工具清單

工具(5)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢run_sql(schema, query, seed, engine)

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"]].

輸入結構描述

{
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "description": "DDL statements (CREATE TABLE ...; multiple statements allowed)."
    },
    "query": {
      "type": "string",
      "description": "ONE SQL statement to execute. Stacked statements are rejected."
    },
    "seed": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": {}
        }
      },
      "description": "Optional seed rows: {\"table_name\": [{\"col\": value, ...}, ...]}. Max 10MB total."
    },
    "engine": {
      "type": "string",
      "enum": [
        "sqlite",
        "duckdb"
      ],
      "description": "Engine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only."
    }
  },
  "required": [
    "schema",
    "query"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢validate_sql(schema, query, engine)

Validate a SQL query against a schema WITHOUT executing it (parse + name/type binding via EXPLAIN). Returns ok with referenced tables, or a structured error: {type: unknown_column|unknown_table|syntax|..., message, position, suggestion}. The suggestion is rule-based (edit distance against your schema). Example: query "SELECT nmae FROM users" → error type unknown_column, suggestion 'did you mean "name"?'.

輸入結構描述

{
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "description": "DDL statements."
    },
    "query": {
      "type": "string",
      "description": "ONE SQL statement to validate."
    },
    "engine": {
      "type": "string",
      "enum": [
        "sqlite",
        "duckdb"
      ],
      "description": "Engine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only."
    }
  },
  "required": [
    "schema",
    "query"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢explain_plan(schema, query, engine)

Return the engine-native query plan for a query (SQLite: EXPLAIN QUERY PLAN) plus full-table-scan warnings. Use it to check whether an index would be used before recommending one. Example: "SELECT * FROM orders WHERE status=?" on an unindexed column → plan ["SCAN orders"], warning about the full scan.

輸入結構描述

{
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "description": "DDL statements (include your indexes!)."
    },
    "query": {
      "type": "string",
      "description": "ONE SQL statement to explain."
    },
    "engine": {
      "type": "string",
      "enum": [
        "sqlite",
        "duckdb"
      ],
      "description": "Engine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only."
    }
  },
  "required": [
    "schema",
    "query"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢run_sql_batch(schema, queries, seed, engine)

Run up to 10 queries against the same schema+seed. Each query executes in its OWN fresh database — writes in one query are NOT visible to the next (use this for testing variants, not for multi-statement transactions). Returns an array of run_sql results in order.

輸入結構描述

{
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "description": "DDL statements."
    },
    "queries": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "maxItems": 10,
      "description": "Up to 10 statements, one per entry."
    },
    "seed": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": {}
        }
      },
      "description": "Optional seed rows: {\"table_name\": [{\"col\": value, ...}, ...]}. Max 10MB total."
    },
    "engine": {
      "type": "string",
      "enum": [
        "sqlite",
        "duckdb"
      ],
      "description": "Engine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only."
    }
  },
  "required": [
    "schema",
    "queries"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢diff_results(schema, seed, query_a, query_b, engine)

Answer "do these two queries return the same thing?" — the self-check for query refactors. Executes query_a and query_b against identical fresh databases and compares result multisets (order-insensitive; order divergence reported separately when ORDER BY is present). Returns equal:boolean, row counts, and capped row-level diffs (only_in_a / only_in_b).

輸入結構描述

{
  "type": "object",
  "properties": {
    "schema": {
      "type": "string",
      "description": "DDL statements."
    },
    "seed": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": {}
        }
      },
      "description": "Optional seed rows: {\"table_name\": [{\"col\": value, ...}, ...]}. Max 10MB total."
    },
    "query_a": {
      "type": "string",
      "description": "Original query."
    },
    "query_b": {
      "type": "string",
      "description": "Refactored/alternative query."
    },
    "engine": {
      "type": "string",
      "enum": [
        "sqlite",
        "duckdb"
      ],
      "description": "Engine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only."
    }
  },
  "required": [
    "schema",
    "query_a",
    "query_b"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#"
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本5 個工具
已驗證未記錄版本5 個工具
已驗證未記錄版本5 個工具