Skip to main content
Glama

Database Overview

db_overview
Read-onlyIdempotent

Get 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

TableJSON Schema
NameRequiredDescriptionDefault
databaseNoName of the database to query (from pgautopilot.json). Omit to use the current default database.
Install Server

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations already declaring readOnlyHint=true and idempotentHint=true, the description adds meaningful behavioral context: row counts are estimates from pg_stat rather than exact COUNT(*), only configured schemas are shown (default public), and safety metadata is included so the agent knows what operations are allowed. This goes well beyond the annotations and helps set accurate expectations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-organized with clear 'When to use' and 'Behavioral notes' sections, and it front-loads the core purpose. It earns its length, though there is minor redundancy: the first paragraph already says to use it as a first call, and the 'When to use' bullets restate similar scenarios.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description fully equips an agent to select and call the tool correctly: it explains what the overview contains, when to use it, how row counts behave, what schemas are visible, and what the return JSON includes. Since there is no output schema, the explicit 'Returns' statement is especially valuable and complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers the single optional parameter at 100%, describing it as 'Name of the database to query (from pgautopilot.json). Omit to use the current default database.' The description does not add parameter-level detail, so the schema carries the full burden; the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Provides a high-level overview') and resource ('connected PostgreSQL database'), then enumerates exactly what the overview contains: tables, row counts, foreign keys, server mode, and safety rules. It also positions itself as the 'first call' when exploring an unfamiliar database, which clearly distinguishes it from more detailed sibling tools like db_schema or db_table_info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'When to use' section gives explicit trigger scenarios: start of a session, 'What's in this database?' questions, and before writing queries to confirm names and relationships. It provides clear context but does not explicitly name sibling tools to avoid, such as db_schema for detailed schema or db_table_info for per-table details.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyberreinxy/pgautopilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server