suggest_index
Analyze SQL via EXPLAIN PLAN to detect full table scans and return a CREATE INDEX DDL recommendation. Not executed; apply after review.
Instructions
Analyse a SQL statement via EXPLAIN PLAN and, when a table is read by full scan, propose a CREATE INDEX statement. Returns the recommended DDL as text; it is never executed. Apply it manually only after DBA review.
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": "suggest_index"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | The SQL statement to analyse (typically SELECT; DML is also supported). | |
| targetTable | No | Optional table name to focus on when several tables are scanned. |