Explain query plan
explain_queryShow the execution plan for any SQL statement—index usage, scan order, estimated rows—without executing it, making write statements safe to analyze.
Instructions
Show the execution plan for a statement (EXPLAIN / EXPLAIN QUERY PLAN) without running it — index usage, scan order, estimated rows. Safe on write statements.
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": {
"sql": "<sql>"
},
"name": "explain_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | Statement to plan (does not get executed) | |
| params | No | Bound parameters: array for positional placeholders (?), object for named ones (:name) where the driver supports them. | |
| connection | No | Named connection to use. Omit when only one connection is configured (or it is named "default"). |