explain_query
Generate the JSON execution plan for a SQL statement without executing it. Analyze query performance and optimize SQL before running.
Instructions
[READ] Return the JSON execution plan for sql (EXPLAIN FORMAT=JSON).
The statement is planned, not executed.
Args: sql: A single SQL statement to EXPLAIN. target: Target name from config; omit for the default.
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 | ||
| target | No |