Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_database_bloat_overview

Analyze PostgreSQL database storage efficiency by identifying tables with high bloat ratios, calculating total bloat size per schema, and providing maintenance recommendations to optimize performance.

Instructions

[Tool Purpose]: Provide database-wide bloat overview and summary statistics

[Exact Functionality]:

  • Summarize bloat statistics across all schemas

  • Identify schemas and tables with highest bloat ratios

  • Calculate total estimated bloat size per schema

  • Show aggregate dead tuple counts and maintenance status

[Required Use Cases]:

  • When user requests "database bloat overview", "bloat summary", etc.

  • When getting high-level view of database storage efficiency

  • When planning database maintenance activities

  • When investigating overall database performance issues

[Strictly Prohibited Use Cases]:

  • Requests for automatic maintenance operations

  • Requests for bloat cleanup or removal

  • Requests for schema or database restructuring

Args: database_name: Target database name (uses default database from POSTGRES_DB env var if omitted) limit: Maximum number of schemas to show (1-50, default: 10)

Returns: Database-wide bloat summary by schema with totals and recommendations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameNo
limitNo

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 the tool's read-only nature by prohibiting maintenance/cleanup operations and specifying it provides 'overview' and 'summary' data. However, it doesn't mention potential performance impacts, data freshness, or authentication requirements, leaving some behavioral aspects uncovered.

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 uses clear section headers ([Tool Purpose], [Exact Functionality], etc.) making it well-structured and easy to parse. While somewhat lengthy, each section adds value (purpose, functionality, usage guidelines, parameters, returns) without redundant information. The front-loaded purpose statement immediately clarifies the tool's intent.

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 (database analysis with 2 parameters), no annotations, but with an output schema mentioned, the description provides comprehensive coverage: clear purpose, detailed functionality, explicit usage guidelines, parameter explanations, and return value description. The output schema existence means the description doesn't need to detail return structure, making this complete for the context.

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

Parameters4/5

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

With 0% schema description coverage and 2 parameters, the description compensates well by explaining both parameters: 'database_name' specifies the target database with fallback to environment variable, and 'limit' defines the maximum schemas to show with range and default. This adds meaningful context beyond the basic schema, though it doesn't detail format constraints for database_name.

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 explicitly states the tool's purpose as 'Provide database-wide bloat overview and summary statistics' and details specific functionalities like summarizing bloat statistics, identifying high-bloat schemas/tables, calculating total bloat size, and showing aggregate dead tuple counts. This clearly distinguishes it from sibling tools like 'get_table_bloat_analysis' which focuses on individual tables rather than database-wide overview.

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 includes a '[Required Use Cases]' section listing specific scenarios (e.g., user requests for 'database bloat overview', planning maintenance, investigating performance issues) and a '[Strictly Prohibited Use Cases]' section explicitly stating when NOT to use it (e.g., automatic maintenance, bloat cleanup, restructuring). This provides 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