Skip to main content
Glama

bloat_and_vacuum_analysis

Read-only

Rank PostgreSQL tables needing vacuum by dead-tuple ratio and autovacuum recency, using injected bloat rows or live data, with cited recommendations.

Instructions

[READ] Rank tables needing vacuum from dead-tuple ratio + autovacuum recency.

Pass 'tables' (as from table_bloat) for pure/offline analysis, or omit to
pull the worst dead-tuple tables live. Each recommendation cites its numbers.

Args:
    tables: Injected table-bloat rows; if omitted, pulled live.
    limit: How many tables to pull when not injected (default 50).
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
tablesNo
targetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true; the description adds real operational context by disclosing the two execution modes (injected rows vs live pull) and that recommendations carry their cited numbers. No permissions, rate limits, or return shape are described, which keeps it below a 5 for a live-querying tool.

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?

Front-loads the [READ] marker and core purpose, then follows with the mode guidance and a compact Args block. The Args section partly restates the prose, but the total length is proportionate to a three-parameter tool.

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?

With no output schema and only a readOnly annotation, the description covers the calling modes and all parameters, and hints at output ('cites its numbers'). It stops short of stating prerequisites or the shape/ordering of the ranking, but nothing essential for correct invocation is missing.

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?

Schema description coverage is 0%, so the description carries the full burden and it does explain all three params: 'tables' as injected table-bloat rows, 'limit' as how many to pull when not injected, and 'target' as a named config entry. 'target' in particular stays vague ('Target name from config'), so it compensates well but not fully.

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?

Names a specific verb and resource ('Rank tables needing vacuum') plus the exact inputs it ranks by ('dead-tuple ratio + autovacuum recency'). This is distinguishable from siblings like table_bloat (raw bloat report) and run_vacuum (the fix), and the [READ] tag further pins it as a diagnostic.

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?

Gives explicit invocation modes: pass 'tables' (as produced by table_bloat) for offline analysis, or omit it to pull the worst tables live. It names a sibling as the upstream source, but does not state when to prefer this over autovacuum_status or run_vacuum for acting on the results.

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