alter_table
Modify MySQL table structure by adding, dropping, modifying, or renaming columns to adapt database schema to changing requirements.
Instructions
Modify an existing table structure
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": {
"table": "<table>",
"operation": "<operation>",
"column": "<column>"
},
"name": "alter_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Table name | |
| operation | Yes | Type of alteration | |
| column | Yes | Column name | |
| definition | No | Column definition for ADD/MODIFY (e.g., 'VARCHAR(255) NOT NULL') | |
| newName | No | New name for RENAME operation | |
| database | No | Database name (optional) |