@spences10/pi-sqlite-tools

SQLite safety workflow reminder that steers Pi agents to use gated mcp-sqlite-tools instead of raw sqlite3

Packages

Package details

extension

Install @spences10/pi-sqlite-tools from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@spences10/pi-sqlite-tools
Package
@spences10/pi-sqlite-tools
Version
0.0.13
Published
Jun 17, 2026
Downloads
548/mo · 89/wk
Author
spences10
License
MIT
Types
extension
Size
11.7 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./dist/index.js"
  ],
  "image": "https://raw.githubusercontent.com/spences10/my-pi/main/assets/pi-package-preview.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@spences10/pi-sqlite-tools

built with Vite+ tested with Vitest npm version license

my-pi package preview

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, and export_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