Skip to main content
Glama
foxter-io

PostgreSQL MCP Server

by foxter-io

Table Bloat Report

pg_bloat_report
Read-only

Identify tables with high dead-tuple ratios that require VACUUM or AUTOVACUUM to improve query performance and reduce storage waste.

Instructions

Identify tables with high dead-tuple ratios that need VACUUM or AUTOVACUUM attention.

Dead rows accumulate from UPDATE and DELETE operations. High dead% degrades query performance and wastes storage. Tables over ~20% dead tuples should be vacuumed.

Args:

  • schema: Filter to a specific schema (optional)

  • min_dead_pct: Minimum dead tuple % to include (default: 5)

  • min_dead_rows: Minimum absolute dead row count (default: 1000)

  • response_format: Output format

Returns: JSON: { tables: BloatInfo[], count: number } Markdown: table sorted by dead% descending, with last vacuum dates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNoFilter to schema (optional)
min_dead_pctNoMinimum dead row % threshold
min_dead_rowsNoMinimum dead row count threshold
response_formatNoOutput format: 'markdown' for human-readable, 'json' for machine-readablemarkdown
Behavior4/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false. Description adds context about dead-tuple accumulation from UPDATE/DELETE and its impact on query performance and storage, which is beyond the annotations. No contradiction; behavior is well disclosed.

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?

Description is front-loaded with main purpose and uses a structured docstring format (Args/Returns). It is concise but could be slightly more streamlined; every sentence adds value. Well-organized for quick scanning.

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 no output schema, description explicitly documents return formats (JSON with BloatInfo fields and count, Markdown sorted by dead%) and includes threshold defaults. Covers all necessary context: purpose, parameter explanations, behavioral impact, and output shape. Fully adequate for a reporting tool.

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?

Schema coverage is 100%, so baseline is 3. Description reiterates parameter names and default values similarly to schema, but adds minimal extra context (e.g., 'Filter to a specific schema (optional)'). Not enough added value to raise score above baseline.

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?

Description clearly states the tool identifies tables with high dead-tuple ratios needing vacuum attention. It uses specific verb 'identify' and resource 'tables... that need VACUUM or AUTOVACUUM attention', distinguishing it from sibling tools like pg_vacuum (performs vacuum) or pg_table_stats (general stats). Includes context on dead row accumulation and performance impact.

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?

Description explains when to use (to find tables needing vacuum) and provides a threshold guideline ('Tables over ~20% dead tuples should be vacuumed'). However, it does not explicitly state when not to use or mention alternatives among siblings. Clear context with reasonable exclusion missing.

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/foxter-io/mcp-postgresql'

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