Database Explorer
Overview
Map schemas before writing queries. Prefer read-only roles and limits.
Tools
Prefer the built-in db_query tool: it queries SQLite files in the workspace directly (sqlite_path) and named connections (PostgreSQL, Supabase, MySQL, MariaDB) configured under tools.database.connections. Connections are read-only unless allowWrites is set. Fall back to CLI clients (psql, mysql, sqlite3) or MCP servers only when a connection is not configured.
Workflow
- Identify engine + connection method (
db_queryconnection, CLI, URL in env, MCP Supabase, etc.). - List databases/schemas/tables - never dump entire prod tables.
- Sample with
LIMIT/ projections; avoidSELECT *on huge tables. - Summarize: entities, keys, relations, row-count estimates.
- Flag PII columns; do not paste sensitive rows into chat.
Rules
- Writes/DDL on shared DBs need
human-approval. - Credentials from env/secret stores only (
secrets-manager).