explain
Retrieve the execution plan for a SQL query to analyze performance and optimize statements without running them. Supports SELECT, INSERT, UPDATE, DELETE, and WITH.
Instructions
获取 SQL 的执行计划,辅助分析查询性能与优化。所有权限模式下均可调用(EXPLAIN 不实际执行原 SQL)。仅支持 SELECT / INSERT / UPDATE / DELETE / WITH 开头的语句;无需自带 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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | 要分析的 SQL(不需要自带 EXPLAIN 前缀) |