Skip to main content
Glama
MySQL MCP Server

MySQL MCP Server

by berthojoris

analyze_table

Idempotent

Updates index statistics for a MySQL table so the query optimizer can plan queries accurately. Specify the table name, and optionally a database.

Instructions

Analyzes a table to update index statistics for the query optimizer.

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_table"
  }
}

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

B3.2/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, and the description is consistent with a non-destructive mutation. The sentence adds useful context by naming the effect (statistics refreshed for the optimizer), but it omits cost/runtime, whether the table is locked or blocked during analysis, and whether the operation can be interrupted.

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 compact sentence that front-loads the action and explains the outcome; there is no filler. It is arguably too short rather than too long, but nothing is wasted.

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 two-parameter tool with no output schema, the definition covers what the tool does and what it changes, which is the essential core. However, for a maintenance mutation it should mention operational characteristics such as cost, blocking behavior, or the fact that results are not returned, so an agent can decide whether it is safe to run now.

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%, with both database and table_name documented inline, so the schema carries parameter semantics. The description adds nothing about qualification rules (e.g., whether database defaults to the current connection's database) beyond what the schema already says.

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 states a specific verb and resource ("analyzes a table") plus the actual effect (updating index statistics for the query optimizer), which is far more informative than the bare name. It does not differentiate from siblings such as analyze_index or analyze_query, so it stops short of a 5.

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 versus analyze_index, analyze_query, check_table, or get_optimization_hints. No prerequisites (permissions, table locks, whether it requires write access) are stated, leaving the agent to infer usage entirely.

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