Skip to main content
Glama
aliyun

Adb MySQL MCP Server

Official
by aliyun

get_execution_plan

Analyze SQL query performance by retrieving the actual execution plan with runtime statistics using the Adb MySQL MCP Server interface.

Instructions

Get the actual execution plan with runtime statistics for a SQL query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe SQL query to analyze

Implementation Reference

  • Handler logic for the get_execution_plan tool: retrieves the query argument and prepends 'EXPLAIN ANALYZE' to it for execution.
    elif name == "get_execution_plan": query = arguments.get("query") if not query: raise ValueError("Query is required") query = f"EXPLAIN ANALYZE {query}"
  • Registration of the get_execution_plan tool within the list_tools() function, defining its name, description, and input schema.
    Tool( name="get_execution_plan", description="Get the actual execution plan with runtime statistics for a SQL query", inputSchema={ "type": "object", "properties": { "query": { "type": "string", "description": "The SQL query to analyze" } }, "required": ["query"] } )
  • Input schema definition for the get_execution_plan tool, specifying the required 'query' parameter.
    inputSchema={ "type": "object", "properties": { "query": { "type": "string", "description": "The SQL query to analyze" } }, "required": ["query"] }

Other Tools

Related 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/aliyun/alibabacloud-adb-mysql-mcp-server'

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