Skip to main content
Glama

pg_health_diagnostics

Diagnose PostgreSQL performance issues by inspecting tables for heavy sequential scans, dead tuples, and unused indexes.

Instructions

Inspect PostgreSQL sequential scan heavy tables, dead tuples, and unused indexes.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "pg_health_diagnostics"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Inspect' implies a read-only diagnostic operation and the checks are named, but it does not explicitly state that it performs no mutations, what permissions are required, or whether scanning system catalogs could be expensive. It adds some behavioral content but leaves key safety and operational context unstated.

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?

A single front-loaded sentence with no filler. Every phrase names a distinct diagnostic target and earns its place.

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

Completeness3/5

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

This is a simple zero-parameter tool with an output schema, so return values do not need explanation in the description. However, the lack of sibling guidance and explicit read-only/safety context leaves the definition only adequately complete for an agent choosing and invoking it.

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?

The tool has zero parameters, so the baseline is 4. There are no parameter semantics to document, and the output schema can explain return fields.

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?

States a specific verb, 'Inspect', and a specific resource, PostgreSQL health diagnostics, then enumerates the targeted checks: sequential scan heavy tables, dead tuples, and unused indexes. It is clear what the tool does, but it does not explicitly differentiate itself from siblings such as pg_explain_query or aws_rds_health.

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

Usage Guidelines2/5

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

Provides no explicit when-to-use or when-not-to-use guidance. An agent cannot tell from the description whether to choose this over pg_explain_query for plan analysis or aws_rds_health for RDS-level health; the usage context is only implied by the tool name and listed checks.

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