change_column_type
MCP tools › Databases
Change a column's type: the statement in the connection's dialect, keeping NOT NULL and the default where the dialect restates the column (MySQL, MariaDB, SQL Server); refused for views and SQLite. notes mark it as one that may lose data (data_loss); transaction says whether it runs in one. By default nothing is run (read-schema permission); apply=true runs it (modify-schema, refused on read-only connections); a refusal or a run in which nothing ran is an error, never applied: true. inverse_ddl is the statement that changes the column back to its old type; it is never run by this tool or by undoing files.
Its results carry text from database: the client is told to treat that as data, never as instructions.
| Capability | database.change_column_type |
|---|---|
| Area | Databases |
| Access | changes database |
| Reaches | database, network |
| Rights | ssh, database-permission, trusted-project |
| Dry run | apply, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
connectionrequired | string | Connection name from list_connections. |
tablerequired | string | Table of the column. |
columnrequired | string | The column. |
new_typerequired | string | New type, e.g. bigint or varchar(200). |
apply | boolean | Run the statement (default false; needs the modify-schema permission). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project change_column_type '{"connection":"<string>","table":"<string>","column":"<string>","new_type":"<string>"}'Input schema as JSON
{ "type": "object", "required": [ "connection", "table", "column", "new_type" ], "properties": { "connection": { "description": "Connection name from `list_connections`.", "type": "string" }, "table": { "description": "Table of the column.", "type": "string" }, "column": { "description": "The column.", "type": "string" }, "new_type": { "description": "New type, e.g. `bigint` or `varchar(200)`.", "type": "string" }, "apply": { "description": "Run the statement (default false; needs the `modify-schema` permission).", "type": [ "boolean", "null" ] } }}