Database Overview
db_overviewGet a quick database overview: table names, estimated row counts, foreign keys, server mode, and safety rules. Use before writing queries to navigate unfamiliar databases.
Instructions
Provides a high-level overview of the connected PostgreSQL database: all tables with approximate row counts, foreign key relationships between tables, the server mode (read-only or read-write), and active safety rules (blocked tables, high-risk tables, sensitive columns). Use this as your first call when exploring an unfamiliar database to understand its structure before querying specific tables.
When to use:
At the start of a session to understand what tables exist and how they relate.
When the user asks "What's in this database?" or "Show me the tables."
Before writing queries, to confirm table names and relationships.
Behavioral notes:
Row counts are estimates from pg_stat (not exact COUNT(*)) for performance.
Only tables in the configured schemas are shown (default: public).
The overview includes safety metadata so the agent knows what operations are allowed.
Returns: JSON with tables array (name, estimated rows, column count), foreign keys, server mode, and safety configuration.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | Name of the database to query (from pgautopilot.json). Omit to use the current default database. |