Get Execution Plan
mssql_execution_planRetrieve the cached execution plan (showplan XML) for a SQL Server query using its plan handle without running the query. Get the handle from mssql_top_queries first.
Instructions
Execution plan (showplan XML) of a cached query, by plan handle. Reads the plan cache only; never runs the query. Get the Plan Handle from mssql_top_queries. Large plans are cut at 35,000 characters.
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": {
"queryPlanHandle": "<queryPlanHandle>"
},
"name": "mssql_execution_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| queryPlanHandle | Yes | Hex plan handle from sys.dm_exec_query_stats (e.g. 0x060006...). |