Skip to main content
Glama

unused_indexes

Read-only

Detect non-unique, non-primary PostgreSQL indexes with zero scans to identify drop candidates, optionally filtered by minimum size or target.

Instructions

[READ] Non-unique, non-primary indexes with zero scans (drop candidates).

Args:
    min_size_bytes: Only report indexes at least this large (default 0).
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
min_size_bytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

readOnlyHint=true already signals a safe read, and the '[READ]' prefix merely repeats it. Beyond that the description adds little behavioral context: it does not note that index scan counters depend on the stats collector, that reset_query_stats can invalidate results, or what fields come back.

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 one-line purpose followed by a compact Args block; no filler. The '[READ]' marker is redundant with annotations and the docstring formatting is a bit template-ish, but overall it is tight.

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?

For a parameterless-required read tool with no output schema, the description covers what is selected but not what is returned (index identity, size, scan counts) nor caveats about statistics freshness that materially affect trust in the 'zero scans' claim.

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 does it reasonably: min_size_bytes is explained as a size threshold with default 0, and target as a config target name with 'omit for the default'. 'Target name from config' remains vague with no enumerated values, but the semantics are substantially clarified.

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 resource and qualifying scope: 'Non-unique, non-primary indexes with zero scans (drop candidates)'. This meaningfully narrows what is returned and distinguishes it from neighbors like invalid_indexes and index_bloat, though it never names those siblings 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?

The parenthetical '(drop candidates)' implies the intended use (finding indexes to remove via drop_index), but there is no explicit when-to-use guidance, no mention of the alternative diagnostics tools, and no note of prerequisites such as index usage statistics being enabled or recently reset.

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