explain_query
Get PostgreSQL query execution plans to analyze and optimize SQL performance. Provides EXPLAIN output in multiple formats like text, JSON, XML, or YAML with options for costs, buffers, and analysis.
Instructions
Get query execution plan (EXPLAIN)
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_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| costs | No | ||
| format | No | ||
| analyze | No | ||
| buffers | No | ||
| database_name | No |