Skip to main content
Glama
MCP-MySQL-Ops

MCP-MySQL-Ops

by call518

get_index_usage_stats

Retrieve MySQL index usage statistics and efficiency metrics to identify unused or inefficient indexes and support query performance optimization.

Instructions

[Tool Purpose]: Get index usage statistics and efficiency analysis

[Exact Functionality]:

  • Show index information with cardinality and selectivity

  • Display index types and usage patterns

  • Identify potentially unused or inefficient indexes

  • Order by cardinality and selectivity metrics

[Required Use Cases]:

  • When user requests "index stats", "index analysis", "index optimization"

  • When optimizing query performance

  • When identifying redundant 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": "get_index_usage_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of indexes to return (default: 20)
database_nameNoDatabase name to analyze (uses current database if omitted)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description bears the full behavioral burden. It does disclose the return content (index info, cardinality, selectivity, index types, usage patterns) and default ordering, but never states that this is a read-only operation, whether it requires privileges, or how many results to expect beyond the limit default. Useful behavioral context, but not complete for an unannotated tool.

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?

The bracketed section headers front-load purpose, functionality, and use cases, making it scannable. Slight redundancy appears where 'cardinality and selectivity' is stated both as displayed fields and as the ordering key, but overall there is no filler.

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?

This is a simple read-only tool with two optional parameters, a 100%-covered schema, and an output schema that already defines return values. The description covers purpose, what is returned, and selection triggers — everything an agent needs before calling it.

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?

Schema coverage is 100%, so both `limit` and `database_name` are already fully documented in the schema with defaults and semantics. The description adds nothing parameter-specific — it mentions ordering metrics but not how `limit` or `database_name` affect results. Baseline 3 applies when the schema does the heavy lifting.

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?

The description opens with a specific verb+resource ('Get index usage statistics and efficiency analysis') and enumerates concrete outputs (cardinality, selectivity, index types, usage patterns, unused/inefficient indexes). The resource ('index') is naturally distinct from siblings like get_table_io_stats or get_table_size_info, but the description never explicitly contrasts itself with those tools, leaving differentiation implicit.

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?

It provides explicit trigger phrases ('index stats', 'index analysis', 'index optimization') and named scenarios (optimizing query performance, identifying redundant indexes), which gives an agent clear positive selection criteria. It stops short of stating when NOT to use this tool or naming an alternative tool for adjacent cases, so it does not reach a 5.

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