explain_query
Inspect a Postgres query plan for a single statement. Optionally execute read-only queries to get real execution timings.
Instructions
Show the Postgres query plan for one statement. analyze: true runs it for real timings and is refused on anything that writes.
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": {
"name": "<name>",
"query": "<query>"
},
"name": "explain_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Connection name or id | |
| query | Yes | A single statement | |
| analyze | No | Execute the statement to get real timings (reads only) | |
| verbose | No | Include VERBOSE output |