Skip to main content
Glama
Rufflet

mysql-legacy-mcp

mysql_legacy_list_indexes

Read-onlyIdempotent

Inspect indexes for a MySQL table, showing key names, columns, uniqueness, and index type using SHOW INDEX. Ideal for identifying table keys.

Instructions

Lists indexes for database.table via SHOW INDEX (key name, columns, uniqueness, type). Use this for keys. For column types use mysql_legacy_describe_table; for full DDL use mysql_legacy_show_create_table.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesMySQL table or view name, 1–64 characters.
databaseYesMySQL database name, 1–64 characters.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.2.1
    • addedInput schema / properties / database / description
      Added value: +"MySQL database name, 1–64 characters."
    • removedInput schema / properties / table / $ref
      Removed value: -"#/properties/database"
    • addedInput schema / properties / table / description
      Added value: +"MySQL table or view name, 1–64 characters."
    • addedInput schema / properties / table / maxLength
      Added value: +64
    • addedInput schema / properties / table / minLength
      Added value: +1
    • addedInput schema / properties / table / type
      Added value: +"string"
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds value by disclosing the implementation (`SHOW INDEX`) and the specific fields returned (key name, columns, uniqueness, type), which is useful context beyond the annotations. No contradictions with annotations.

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 compact sentences convey purpose, implementation, output contents, and routing to alternatives. There is no filler or redundant repetition of schema or annotation info, and the core purpose is front-loaded.

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?

Despite having no output schema, the description compensates by naming the returned fields and explaining the SHOW INDEX basis. It covers the invocation pattern, the read-only nature, and explicitly directs to sibling tools for other introspection needs, making it complete enough for an agent to call correctly.

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 description coverage is 100%, and both `database` and `table` already have clear schema descriptions with length constraints. The description only restates the 'database.table' pattern and adds no new parameter-level meaning. Baseline 3 is appropriate since the schema carries the parameter documentation burden.

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 names the specific verb ('Lists'), the exact resource ('indexes for database.table'), and the implementation method ('SHOW INDEX') with the key output fields. It also distinguishes itself from sibling tools by stating 'Use this for keys' and referencing describe_table/show_create_table for other use cases.

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

Usage Guidelines5/5

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

It explicitly says when to use this tool ('Use this for keys') and names the alternatives with the conditions for choosing them ('For column types use mysql_legacy_describe_table; for full DDL use mysql_legacy_show_create_table'). This gives an agent unambiguous routing guidance.

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