db.explain
Get PostgreSQL EXPLAIN plans for SELECT/WITH queries without executing them, enabling safe query analysis and optimization on a read-only server.
Instructions
Return PostgreSQL EXPLAIN plans for one or more SELECT/WITH statements without executing them.
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": "db.explain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| params | No | ||
| database | No |