Skip to main content
Glama
isdaniel

PostgreSQL-Performance-Tuner-Mcp

get_bloat_summary

Read-onlyIdempotent

Analyze PostgreSQL database bloat to identify tables and indexes with wasted space, estimate reclaimable storage, and prioritize maintenance tasks for performance optimization.

Instructions

Get a comprehensive summary of database bloat across tables and indexes.

Note: This tool analyzes only user/client tables and indexes, excluding PostgreSQL system objects (pg_catalog, information_schema, pg_toast). This focuses the analysis on your application's custom objects.

Provides a high-level overview of:

  • Top bloated tables by wasted space

  • Top bloated indexes by estimated bloat

  • Total reclaimable space estimates

  • Priority maintenance recommendations

Uses pgstattuple_approx for tables (faster) and pgstatindex for B-tree indexes. Requires the pgstattuple extension to be installed.

Best for: Quick assessment of database bloat and maintenance priorities.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schema_nameNoSchema to analyze (default: public)public
top_nNoNumber of top bloated objects to show (default: 10)
min_size_gbNoMinimum object size in GB to include (default: 5)
Behavior4/5

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

The description adds valuable behavioral context beyond annotations: it discloses the tool's scope limitation (excludes PostgreSQL system objects), technical implementation details (uses pgstattuple_approx and pgstatindex), and prerequisites (requires pgstattuple extension). While annotations cover safety aspects (readOnlyHint, destructiveHint), the description enriches understanding of what the tool actually does and its constraints.

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

Conciseness5/5

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

The description is well-structured and appropriately sized. It starts with the core purpose, provides important notes and scope limitations, lists what the tool provides, mentions implementation details, and ends with usage guidance. Every sentence adds value without redundancy.

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

Completeness4/5

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

Given the tool's complexity and the absence of an output schema, the description provides substantial context about what the tool returns (high-level overview with specific categories) and its behavioral characteristics. The annotations cover safety aspects well, and the description adds important operational context, though it could potentially provide more detail about output format.

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?

With 100% schema description coverage, the input schema already fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's in the schema, so it meets the baseline expectation but doesn't provide extra semantic value for parameter understanding.

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 with specific verbs ('get', 'analyzes', 'provides') and resources ('database bloat across tables and indexes'). It distinguishes from siblings by focusing specifically on comprehensive bloat analysis rather than granular analysis (like analyze_table_bloat or analyze_index_bloat) or other database functions.

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 usage guidance with a 'Best for:' section that states 'Quick assessment of database bloat and maintenance priorities.' It also distinguishes from alternatives by noting it analyzes only user/client tables and indexes, excluding system objects, which helps differentiate it from other analysis tools.

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/isdaniel/pgtuner-mcp'

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