explain_query
Generate an execution plan for a SQL query to analyze performance and identify optimization opportunities.
Instructions
Get the execution plan for a SQL query
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": {
"connectionId": "<connectionId>",
"query": "<query>"
},
"name": "explain_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SQL query to analyze | |
| format | No | Output format for the execution plan | text |
| analyze | No | Run EXPLAIN ANALYZE for actual execution stats | |
| connectionId | Yes | The ID or name of the database connection |