Skip to main content
Glama
r69shabh

pg-bloat-detective

bloat_timeline

Fetches a time series of dead tuples and table/index bloat to pinpoint when bloat started and whether vacuum starvation or blocking caused it.

Instructions

Dead-tuple + approx + index-bloat time series: when the bloat started.

Read-only on the local timeline file. Args: table: Table name to filter (e.g. 'churn'). Empty = all tables. db: Path to the SQLite timeline file (default: BLOAT_DB env). Returns: {table: {dead: [{ts, live, dead}], approx_pct: [{ts, dead_pct}]}, index_bloat: {index: [{ts, bloat_pct}]}}. Rising dead = vacuum-starved; spike-then-zero = was blocked, blocker left.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbNo
tableNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.6

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it explicitly declares the read-only, local-file nature of the operation and adds real interpretive value ('Rising dead = vacuum-starved; spike-then-zero = was blocked, blocker left'). It omits any dependency on prior collection by bloat_collect, which is the main behavioral gap.

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-loaded summary line followed by clearly labeled Args and Returns blocks; nothing is redundant. The Returns block is dense but justified since no output schema exists.

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 no annotations, the description supplies the return shape and even explains how to read the series, which is the information an agent actually needs. The missing prerequisite (data collected first) and any retention/range limits keep it short of a 5.

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 coverage is 0%, so the description must compensate, and it does: it explains table filtering with an example ('churn', empty = all tables) and documents db as the path to the SQLite timeline file with a BLOAT_DB env default. Minor mismatch with the schema's empty-string default for db is a small blemish.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific resource and framing: a 'dead-tuple + approx + index-bloat time series' answering 'when the bloat started'. This implicitly separates it from the live/diagnostic siblings (bloat_live_diagnose) and the point-in-time check (bloat_check), though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is implied by 'when the bloat started' and 'Read-only on the local timeline file', which suggests a historical/lookup use case. However, it never says when to prefer this over bloat_live_diagnose or bloat_blockers, nor that the timeline must already be populated by bloat_collect.

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