Explain query
explain_queryExplain SELECT queries as JSON summaries with total cost, node types, sequential scans, and index scans—without executing the query or allowing writes.
Instructions
Run EXPLAIN (FORMAT JSON) for a SELECT query and return a plain summary: total cost, node types, sequential scans, and index scans. The query is planned, never executed, and writes are rejected.
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": {
"query": "<query>"
},
"name": "explain_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The SELECT query to explain, e.g. "SELECT * FROM orders WHERE customer_id = 1". |