Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_all_tables_stats

Retrieve comprehensive statistics for all PostgreSQL database tables, including access patterns, tuple operations, and maintenance history to analyze usage and identify maintenance needs.

Instructions

[Tool Purpose]: Get comprehensive statistics for all tables (including system tables if requested)

[Exact Functionality]:

  • Show detailed access statistics for all tables in database

  • Include sequential scans, index scans, and tuple operations

  • Provide live/dead tuple estimates and maintenance history

  • Option to include system catalog tables

[Required Use Cases]:

  • When user requests "all tables stats", "complete table statistics", etc.

  • When analyzing overall table usage patterns

  • When investigating table maintenance needs across the database

  • When getting comprehensive database activity overview

[Strictly Prohibited Use Cases]:

  • Requests for table maintenance operations (VACUUM, ANALYZE)

  • Requests for statistics reset or modification

  • Requests for table optimization actions

Args: database_name: Database name to analyze (uses default database if omitted) include_system: Include system tables in results (default: False)

Returns: Comprehensive table statistics including access patterns and maintenance history

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameNo
include_systemNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes what the tool does (read-only statistical analysis), what it includes (system tables optionally), and what it doesn't do (no modifications, maintenance, or optimizations). However, it doesn't mention potential performance impact, rate limits, or authentication requirements.

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-structured with clear sections ([Tool Purpose], [Exact Functionality], etc.) and every sentence adds value. However, it could be slightly more concise by combining some of the use case descriptions, and the 'Args' and 'Returns' sections somewhat duplicate information already covered.

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?

Given the tool's complexity (comprehensive statistics analysis), no annotations, and the presence of an output schema, the description provides excellent context. It explains purpose, functionality, use cases, prohibitions, parameters, and return values, making it complete enough for an agent to understand when and how to use this tool effectively.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining both parameters in detail: 'database_name: Database name to analyze (uses default database if omitted)' and 'include_system: Include system tables in results (default: False)'. This provides clear semantic meaning beyond what the bare schema offers.

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 clearly states the tool's purpose as 'Get comprehensive statistics for all tables' with specific details about what statistics are included (access statistics, sequential/index scans, tuple operations, live/dead tuple estimates, maintenance history). It distinguishes itself from sibling tools by focusing on comprehensive statistics for all tables rather than specific aspects like bloat analysis, size info, or individual table stats.

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

Usage Guidelines5/5

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

The description provides explicit 'Required Use Cases' (when user requests all tables stats, analyzing overall usage patterns, investigating maintenance needs, getting database activity overview) and 'Strictly Prohibited Use Cases' (requests for table maintenance operations, statistics reset/modification, optimization actions). This gives clear guidance on when to use this tool versus alternatives.

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

Install Server

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/call518/MCP-PostgreSQL-Ops'

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