MCP server for SQLite databases — local files (better-sqlite3) or remote Turso/libSQL via URL. 15 tools for query, schema, indexes, and optimization
Strong schema definitions and excellent tool organization across 15 well-named tools. All tools have clear, action-verb names (sqlite_query, sqlite_execute, sqlite_create_table, etc.) and complete JSON Schema input definitions. Descriptions are comprehensive and LLM-optimized (ranging 150-300 chars). Tool annotations are present with readOnlyHint, destructiveHint, and idempotentHint flags. However, output schemas are not documented, the code shows tool definitions but does not specify what fields each tool returns, which limits LLM planning for downstream tool calls. Parameter descriptions are detailed and include examples. Security is handled well with parameter binding for SQL injection prevention. Minor gaps: no explicit error handling guidance in descriptions, and no per-tool confirmation/dry-run patterns for destructive operations.
Alter an existing table — add a new column, rename a column, or rename the table. SQLite does not support dropping columns via ALTER TABLE.
Create an index on one or more columns to improve query performance. Supports unique indexes and partial indexes (with WHERE clause).
Create a new table with column definitions. Each column has a name, type, and optional constraints (PRIMARY KEY, NOT NULL, UNIQUE, DEFAULT). Use ifNotExists to skip if the table already exists.
Get the column schema of a table — column names, data types, NOT NULL constraints, default values, and primary key flags. Also returns the CREATE TABLE SQL statement.
Drop (delete) an index from a table. This does not affect data, only query performance.
Drop (delete) a table and all its data permanently. This action is irreversible. Use ifExists to avoid errors if the table does not exist.
Output schemas not documented. While input schemas are complete, tool descriptions do not specify what fields are returned (e.g., sqlite_list_tables returns 'name, type, rowCount' but this is only stated in the description text, not in a structured output schema). LLMs cannot plan downstream tool chains without knowing response structure.
No pagination or result-limiting guidance. sqlite_query and sqlite_list_tables can return unbounded results. Descriptions mention optional parameters but do not specify limits, making it possible for LLMs to accidentally retrieve thousands of rows and exhaust context windows.
Inferred effective spec: 2026-07-28+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 67 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 0 | - | v1 |
Execute a write statement (INSERT, UPDATE, DELETE, CREATE, ALTER, DROP) on the SQLite database. Returns the number of rows changed and the last inserted row ID. Use parameter binding for safe writes.
Get metadata about the database — file path, size, page count, table count, SQLite version, journal mode, and encoding.
Check the integrity of the database and detect corruption. Returns 'ok' if no issues detected, otherwise returns list of error messages.
List foreign key constraints on a table — referenced table, local and remote columns, ON UPDATE and ON DELETE actions.
List all indexes on a table — index name, uniqueness, origin (manual or auto-created), and whether it is a partial index.
List all tables and views in the database with their row counts. Use this as the first step to explore an unfamiliar database. Returns table name, type (table or view), and row count.
Execute a SELECT query on the SQLite database and return rows as a JSON array. Use this for reading data — supports any valid SELECT statement with optional parameter binding for safe queries.
Execute multiple SQL statements in a single transaction. All statements succeed or all fail (atomic). Separate statements with semicolons. Use for migrations, seed data, or batch operations.
Optimize the database by rebuilding it and reclaiming unused space. Returns file size before and after optimization. This may take time on large databases.
Destructive operations (sqlite_drop_table, sqlite_drop_index, sqlite_run_script with DROP statements) lack confirmation or dry-run support. Descriptions flag destructiveHint=true but provide no recovery guidance or confirmation mechanism, risking accidental data loss.
Error handling guidance missing. Tool descriptions do not explain what errors are possible or how to recover. For example, sqlite_execute with malformed SQL or constraint violations will fail, but the description offers no hint to retry with modified parameters or call sqlite_describe_table first.
Parameter validation constraints not fully specified. sqlite_alter_table 'action' enum is properly declared, but other tools like sqlite_query lack explicit format constraints for SQL strings (no mention of character limits, SQL dialect requirements, or injection prevention in parameter descriptions, though the implementation does use parameterized queries).
sqlite_list_tables '_fields' parameter is optional and vague. Description says 'comma-separated list' but does not enumerate valid field names or what happens if an invalid field is requested. LLMs may guess invalid values.