Changes and migrations · stop 9 of 10
run_maintenance
Runs VACUUM, ANALYZE or REINDEX.
Needs admin modeTool sets: dba · full
You might ask
“Vacuum and analyze the events table.”
Your assistant may call run_maintenance to answer.
How it works
- Needs admin mode. Runs outside a transaction, as Postgres requires.
full: truerunsVACUUM FULL, which rewrites the table and locks it while it runs.
Parameters
actionstringrequired- Maintenance action: "vacuum", "analyze", or "reindex".
fullboolean- For action="vacuum", run VACUUM FULL (rewrites the table, takes an exclusive lock). Default false.
tablestring- Target table as "schema.name". Omit to run against the whole database where supported.
What your assistant reads
The description nexql-mcp sends with the tool. It's how the assistant decides when to use it.
Run VACUUM, ANALYZE, or REINDEX outside a transaction. Admin mode only. Optional table (schema.name); vacuum supports full=true.