Skip to main content
Glama
Snarloff

pg-multi-mcp

by Snarloff

analyze_db_health

Read-only

Run health checks on a PostgreSQL database to detect index bloat, connection issues, vacuum risks, replication lag, and other problems.

Instructions

Analyzes database health. Here are the available health checks:

  • index - checks for invalid, duplicate, and bloated indexes

  • connection - checks the number of connection and their utilization

  • vacuum - checks vacuum health for transaction id wraparound

  • sequence - checks sequences at risk of exceeding their maximum value

  • replication - checks replication health including lag and slots

  • buffer - checks for buffer cache hit rates for indexes and tables

  • constraint - checks for invalid constraints

  • all - runs all checks You can optionally specify a single health check or a comma-separated list of health checks. The default is 'all' checks.

Input Schema

NameRequiredDescriptionDefault
connectionNoNome ou alias da conexão (veja list_connections). Se omitido, usa a conexão ativa ou a padrão.
health_typeNoOptional. Valid values are: all, buffer, connection, constraint, index, replication, sequence, vacuum.all

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

readOnlyHint=true already establishes the safety profile, so the description's job is to add context — and it does, by explaining what each check actually inspects (invalid/bloated indexes, transaction id wraparound, replication lag and slots, buffer cache hit rates). It still omits cost/duration expectations, which matters since 'all' runs eight checks, and says nothing about prerequisites such as privileges.

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?

Purpose leads, the check catalogue is a scannable bullet list where each line earns its place, and the selection/default rule closes the description. Slightly redundant in that the opening sentence restates the tool name almost verbatim, but the remainder is dense and well ordered.

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 readOnlyHint, an output schema, and 100% parameter description coverage, the description only needs to justify selection among checks — which it does thoroughly. Missing only runtime-cost/runtime-duration expectations so an agent can decide between one check and 'all' on a large database.

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 100%, so baseline is 3, but the description genuinely adds meaning beyond the schema's bare value list by defining what each health_type category detects — an agent can choose 'vacuum' for wraparound risk or 'replication' for lag without guessing. The connection parameter is left entirely to the schema, which is acceptable at full coverage.

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?

States a specific verb and resource ("Analyzes database health") and immediately enumerates the eight check categories, which lets an agent distinguish it from siblings like analyze_workload_indexes, analyze_query_indexes, and get_top_queries that also touch database analysis.

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?

The description explains how to select checks (single value, comma-separated list, or default 'all'), which is usage-relevant, but it never says when to prefer this diagnostic tool over the sibling analyzers, nor when a specific check subset is more appropriate than 'all'. Guidance is implied through the per-check explanations rather than stated.

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