Skip to main content
Glama
xucodeboy

MySQL MCP Server Pro

by xucodeboy

optimize_sql

Analyzes SQL queries to identify performance bottlenecks and provides optimization recommendations based on execution plans, table structures, and indexes to improve database query performance.

Instructions

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

Input Schema

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

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

With no annotations provided, the description carries full burden for behavioral disclosure. It describes what the tool does (analyzes SQL, provides optimization suggestions) but lacks critical behavioral details: whether it requires specific database permissions, if it executes the SQL (potentially read-only vs. destructive), expected response format, or any rate limits. The description is functional but incomplete for safe agent invocation.

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 description is appropriately concise (two sentences) and front-loaded with the core purpose. Every sentence adds value: the first defines the tool's function and scope, the second elaborates on analysis and optimization types. There's no redundant information, though it could be slightly more structured (e.g., bullet points for optimization types).

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?

Given the tool's complexity (performance analysis with multiple factors like execution plans, indexes) and lack of annotations/output schema, the description is insufficient. It doesn't explain what the optimization suggestions look like (e.g., structured output, text report), how comprehensive the analysis is, or dependencies on other tools (e.g.,是否需要先获取表结构). For a tool with no structured output and behavioral unknowns, more context is needed.

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 one parameter ('text' described as '要优化的sql'), so the baseline is 3. The description adds no additional parameter semantics beyond what the schema provides—it doesn't clarify SQL dialect requirements (e.g., MySQL-specific), input format expectations, or examples. The description's mention of 'SQL语句' aligns with the schema but doesn't enhance it.

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 clearly states the tool's purpose: '专业的SQL性能优化工具...提供专家级优化建议' (professional SQL performance optimization tool providing expert optimization suggestions). It specifies the exact function (analyze SQL efficiency, identify bottlenecks, provide optimization solutions) and distinguishes itself from siblings like execute_sql (which executes SQL) or get_table_index (which retrieves index information).

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?

The description provides no guidance on when to use this tool versus alternatives. While it mentions analyzing SQL statements for performance optimization, it doesn't specify prerequisites (e.g., when you have a slow query), exclusions (e.g., not for DDL statements), or direct comparisons to siblings like get_db_health_index_usage (which might provide index usage insights). Usage is implied but not explicitly stated.

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/xucodeboy/mysql_mcp_server_pro'

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