explain_plan
Return the engine-native query plan for a query (SQLite: EXPLAIN QUERY PLAN) plus full-table-scan warnings. Use it to check whether an index would be used before recommending one. Example: "SELECT * FROM orders WHERE status=?" on an unindexed column → plan ["SCAN orders"], warning about the full scan.
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": {
"schema": "<schema>",
"query": "<query>"
},
"name": "explain_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ONE SQL statement to explain. | |
| engine | No | Engine. Server-side supports 'sqlite' (default). 'duckdb' runs in the browser demo at sqlai.dev only. | |
| schema | Yes | DDL statements (include your indexes!). |