Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

analyze_index

Idempotent

Refresh index statistics by analyzing a specified MySQL table, helping the query optimizer choose better execution plans.

Instructions

Analyzes a table to update index statistics.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table_name": "<table_name>"
    },
    "name": "analyze_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional: specific database name
table_nameYesName of the table to analyze

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.46.0

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the safety profile is covered; the description's 'update index statistics' is consistent with that and clarifies *what* the mutation does. It adds nothing about cost, locking, blocking of concurrent queries, or impact on query plans, which is the behavioral context an agent would actually need before running maintenance on a live table.

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?

A single short sentence with no filler and the effect front-loaded. Its brevity is not the problem; the missing detail is covered under other dimensions.

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

Completeness2/5

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

For a mutating maintenance tool with no output schema and no annotations describing side effects beyond the safety hints, the definition says nothing about runtime cost, locks, or what the agent should expect afterwards. It is under-specified for the complexity of the operation.

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 parameters (database, table_name) are documented inline, so the baseline is 3. The description adds no qualification such as whether database defaults to the current connection or what qualifies a valid table name.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a verb ('Analyzes') and an effect ('update index statistics'), but the resource is ambiguous: the tool is named analyze_index yet the description says it analyzes a *table*. The sibling list contains both analyze_table and analyze_index, and nothing here explains how the two differ, so an agent cannot confidently separate them.

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 call this rather than analyze_table, check_table, or get_index_info, no prerequisites, and no exclusions. The only usage signal is the word 'update' implying a maintenance operation, which the agent must infer.

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