Skip to main content
Glama
igorolv

jdbc-mcp-server

unusedIndexes

unusedIndexes
Read-onlyIdempotent

Identify unused non-primary or non-unique indexes with zero recorded scans, using workload counters, to surface removal candidates after representative database traffic.

Instructions

Find non-PK/non-unique indexes with zero recorded scans as removal candidates. Unlike redundantIndexes, this uses workload counters, which are meaningful only after representative traffic and are not supported by every engine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaNo
connectionYesDatabase to run against. Call listConnections for valid names; do not guess.
minSizeBytesNoMinimum size in bytes; omit tiny indexes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoAdditional context about support, limits, interpretation, or engine-specific behavior.
countYesNumber of unused indexes returned.
schemaNo
indexesNoIndexes available on the table or returned by an index-statistics scan.
supportedYesTrue when this tool is supported for the current database engine and privileges.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint=false. The description adds useful behavioral context beyond these annotations by revealing reliance on workload counters and their limitations, which is important for interpreting results correctly.

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?

Two efficient sentences front-load the core purpose and then add a differentiating caveat. Every word contributes value, with no redundant restatement of the tool name or schema.

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

Completeness5/5

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

Given an output schema, clear parameter documentation for most fields, and annotations already covering safety, the description supplies the remaining essential context: what the tool looks for, how it differs from a sibling, and when its results are valid. Nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents connection and minSizeBytes with descriptions, covering 67% of parameters. The description does not add new meaning about parameters; the only undocumented parameter 'schema' is not clarified in the description either, leaving a modest gap.

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?

The description states a specific verb ('Find') and a clearly defined resource: non-PK/non-unique indexes with zero recorded scans, framed as removal candidates. It also explicitly differentiates itself from redundantIndexes, so an agent can distinguish the tool without inspecting schemas.

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

Usage Guidelines4/5

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

The description names redundantIndexes as the alternative and explains that this tool relies on workload counters, which are only meaningful after representative traffic and not supported by every engine. It provides clear context for when the tool is appropriate, though it does not give an explicit 'when not to use' list.

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