pg_explain_query
Run EXPLAIN or EXPLAIN ANALYZE on a validated SELECT query to inspect PostgreSQL query plans and diagnose performance issues safely in a read-only transaction.
Instructions
Run EXPLAIN (or EXPLAIN ANALYZE inside a read-only txn) on a validated SELECT query.
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": "pg_explain_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| analyze | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||