Skip to main content
Glama
Ustinianslife

MySQL MCP Server Pro

optimize_sql

Analyze MySQL queries using execution plans, table structures, and data volumes to identify bottlenecks and deliver optimization recommendations including index improvements and query rewrites.

Instructions

专业的SQL性能优化工具,基于MySQL执行计划、表结构信息、表数据量、表索引提供专家级优化建议。该工具能够分析SQL语句的执行效率,识别性能瓶颈,并提供具体的优化方案,包括索引优化、查询重写建议等,帮助提升数据库查询性能。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes要优化的sql
Behavior3/5

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

With no annotations, description carries full burden. It discloses analytical methodology (execution plans, table structure analysis) and advisory nature ('provides suggestions'), but fails to explicitly state read-only safety, whether it executes the SQL to gather stats, or what output format to expect.

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?

Two-sentence structure is appropriately sized. Some redundancy between sentences (both mention optimization/suggestions), but the second sentence successfully elaborates on specific capabilities (index optimization, query rewriting).

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?

Adequate for a single-parameter tool but missing critical details given no output schema: no description of return value structure (textual advice vs. JSON), no explicit safety guarantees (read-only assertion), and no mention of whether it requires database connection permissions beyond the SQL text itself.

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 has 100% coverage with '要优化的sql'. Description mentions MySQL specifically, implying the SQL should be MySQL-compatible, but adds minimal semantic detail about expected format, length limits, or whether multiple statements are accepted.

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?

Description clearly states the tool optimizes SQL performance using MySQL execution plans and table metadata. It effectively distinguishes from sibling execute_sql (execution vs. analysis) and from metadata tools like get_table_index (retrieval vs. optimization advice).

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

Usage Guidelines3/5

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

Description implies usage context (when you need SQL optimization advice) but lacks explicit when-to-use guidance or explicit contrast with alternatives. No mention of prerequisites like requiring valid MySQL SQL syntax or when to prefer execute_sql for testing.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ustinianslife/mysql_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server