explain
Run execution plan analysis on SELECT and WITH queries to generate structured reports that identify PostgreSQL performance bottlenecks and guide query optimization.
Instructions
Run EXPLAIN ANALYZE on a SELECT query and return a structured report.
Args: sql: A SQL query. Only SELECT and WITH statements are allowed.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |