Skip to main content
Glama

missing_index_hints

Read-only

Detect PostgreSQL tables with heavy sequential scans and few index scans to find indexing opportunities. Filter by scan count, live tuples, and target.

Instructions

[READ] Tables with heavy sequential scans and few index scans (index hints).

Args:
    min_seq_scan: Minimum cumulative sequential scans to flag (default 1000).
    min_live_tup: Minimum live tuples for a table to qualify (default 10000).
    target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNo
min_live_tupNo
min_seq_scanNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, and the description adds only a redundant [READ] prefix. It does not disclose what the output looks like, how 'few index scans' is computed, whether thresholds are cumulative or per-table, or any cost/scan concern — all of which would be new information beyond the annotation.

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 with no filler. The defaults repeated in the prose duplicate what the schema already declares, which is minor redundancy.

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 read-only diagnostic with three optional params and no output schema, the definition covers inputs adequately but says nothing about the shape of results (per-table rows? suggested indexes?), which an agent would need to interpret the response. Adequate but with a clear gap.

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?

With schema description coverage at 0%, the description carries the full burden and mostly succeeds: min_seq_scan (cumulative sequential scans to flag, default 1000), min_live_tup (minimum live tuples to qualify, default 10000), and target (config target name; omit for default) each get a one-line meaning. Only 'target' remains vague about what a target actually is.

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 (tables with heavy sequential scans and few index scans) and frames it as a read-only diagnostic, which separates it from siblings like unused_indexes, index_bloat, or invalid_indexes. It stops short of explicitly stating the outcome, e.g. that it surfaces candidate tables for a new index, so an agent must infer the use case from the name.

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?

There is no guidance on when to reach for this tool versus top_queries, unused_indexes, or explain_query, nor any exclusions. The only usage information is the parameter list, which describes knobs rather than context.

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