safe_alter_table
Converts high-level schema change intents (add column, foreign key, index, etc.) into multi-step zero-downtime DDL recipes for safe table alterations.
Instructions
Convert a high-level intent ('add NOT NULL column with default', 'add NOT NULL', 'add foreign key', 'add CHECK', 'create index', 'drop index') into a multi-step zero-downtime DDL recipe. Each step has its own SQL, expected lock level, and notes. Pipe the resulting scriptSql through dry_run_sql_file for verification, then through executeSqlFile(useTransaction=false) for the production rollout (CONCURRENTLY operations cannot run inside a transaction).
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": {
"intent": "<intent>"
},
"name": "safe_alter_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | Yes |