Expand description
MCP tool implementations. Each submodule defines a single tool by
implementing SqliteServerTool and providing the associated input, output,
error, and value types.
Modules§
- backup_
tool - The
backuptool: creates a full backup of the database to a file path using rusqlite’s online backup API. - create_
fts_ index_ tool - The
create_fts_indextool: creates a full-text search virtual table backed by FTS5 over columns of an existing table. - database_
info_ tool - The
database_infotool: returns metadata about the SQLite database including file size, page metrics, journal mode, WAL status, version, and object counts. - describe_
table_ tool - The
describe_tabletool: returns column metadata for a given table using SQLite’sPRAGMA table_info. Useful for inspecting schema details before writing queries. - execute_
tool - The
executetool: runs a SQL query against the database and returns typed results. This is the primary tool exposed by the MCP server. - explain_
query_ tool - The
explain_querytool: returns the EXPLAIN QUERY PLAN output for a SQL statement, showing how SQLite will execute the query. - list_
foreign_ keys_ tool - The
list_foreign_keystool: returns all foreign key constraints defined on a given table. Each row from SQLite’sPRAGMA foreign_key_listbecomes one entry in the result, so composite foreign keys appear as multiple entries sharing the sameid. - list_
indexes_ tool - The
list_indexestool: returns index metadata for the database. When given a table name, only indexes on that table are returned; otherwise all indexes are listed. Each entry includes the index name, owning table, uniqueness flag, column list, and partial-index predicate (if any). - list_
tables_ tool - The
list_tablestool: returns the names and schemas of all tables in the database. Useful for discovery before issuing queries. - list_
triggers_ tool - The
list_triggerstool: returns all triggers in the database, or only those attached to a specific table. Each trigger includes its name, table, event, timing, and full SQL definition. - list_
views_ tool - The
list_viewstool: returns the names and defining SQL of all views in the database. Useful for discovery before issuing queries against views. - search_
fts_ tool - The
search_ftstool: runs a full-text search query against an FTS5 virtual table, returning ranked results with highlighted snippets. - vacuum_
tool - The
vacuumtool: runs SQLite’s VACUUM command to reclaim unused space and defragment the database file.
Enums§
- Tool
Error - The top-level error type returned by all MCP tools. Wraps errors common to every tool (connection pool failures, access control denials) and delegates to a tool-specific inner error for anything unique to the individual tool’s logic.