Self-driving optimize (dry-run default)
litescope_autopilotGenerates a safe SQLite maintenance plan for local databases, explaining ANALYZE, PRAGMA optimize, missing foreign-key indexes, and VACUUM actions before optional execution.
Instructions
Self-driving DBA for a local SQLite database. Derives safe maintenance and optimization actions — ANALYZE, PRAGMA optimize, missing foreign-key indexes, and (when fragmented) VACUUM / redundant-index cleanup — each explained in plain language.
Dry-run by default (apply=false): returns the plan without changing anything. apply=true executes the safe actions and requires --allow-writes; a snapshot is taken first so the run is one litescope_restore away from undo. Risky actions (VACUUM, dropping indexes) only run with aggressive=true. Local files only.
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": {
"source": "<source>"
},
"name": "litescope_autopilot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | Execute the safe actions. Default false (dry-run). Requires --allow-writes. | |
| source | Yes | Local SQLite file path. | |
| aggressive | No | Also run risky actions (VACUUM, drop redundant indexes). |