pg_explain
Run EXPLAIN ANALYZE on a SQL query to return its execution plan without side effects, since the query is always rolled back. Use it to inspect query performance.
Instructions
Run EXPLAIN ANALYZE on a query and return the execution plan. The query is always rolled back to prevent side effects.
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": {
"database": "<database>",
"query": "<query>"
},
"name": "pg_explain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | SQL query to analyze | |
| params | No | Optional query parameters for $1, $2, ... placeholders | |
| database | Yes | Database label from config |