@spences10/pi-sqlite-tools
extensionmaintainedSQLite safety workflow reminder that steers Pi agents to use gated mcp-sqlite-tools instead of raw sqlite3
by — · v0.0.15 · published 2w ago
$ pi install npm:@spences10/pi-sqlite-toolsSignals
Download trend
1.5K downloads · last 12 weeks (weekly)
README
@spences10/pi-sqlite-tools

Make SQLite work safer than ad-hoc shell commands. pi-sqlite-tools
reminds agents to use the gated mcp-sqlite-tools workflow for
inspecting, querying, backing up, and modifying databases instead of
raw sqlite3 scripts.
Installation
pi install npm:@spences10/pi-sqlite-tools
Local development from this monorepo:
pnpm --filter @spences10/pi-sqlite-tools run build
pi install ./packages/pi-sqlite-tools
# or for one run only
pi -e ./packages/pi-sqlite-tools
What it does
The extension injects a system reminder telling the model to use
mcp-sqlite-tools when working with SQLite files such as:
.db.sqlite.sqlite3
It encourages the safer MCP workflow:
- open databases with
open_database - inspect structure with
database_info,list_tables,describe_table, andexport_schema - run reads with
execute_read_query - back up and use transactions before writes or schema changes
- close databases when finished
It adds no slash commands and no custom tools.
Example MCP config
mcp-sqlite-tools must be configured separately, for example in
~/.pi/agent/mcp.json:
{
"mcpServers": {
"mcp-sqlite-tools": {
"command": "npx",
"args": ["-y", "mcp-sqlite-tools"]
}
}
}
Using from a custom harness
import sqliteTools from '@spences10/pi-sqlite-tools';
// pass `sqliteTools` as an ExtensionFactory to your Pi runtime
my-pi imports this package directly and enables it as the built-in
SQLite tools reminder.
Development
Package scripts build transitive workspace dependencies first, then
run local tools through Vite+ with vp exec.
pnpm --filter @spences10/pi-sqlite-tools run check
pnpm --filter @spences10/pi-sqlite-tools run test
pnpm --filter @spences10/pi-sqlite-tools run build
License
MIT