Skip to content

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.

Capabilitydatabase.change_column_type
AreaDatabases
Accesschanges database
Reachesdatabase, network
Rightsssh, database-permission, trusted-project
Dry runapply, on unless the call turns it off

Arguments

ArgumentTypeDescription
connectionrequiredstringConnection name from list_connections.
tablerequiredstringTable of the column.
columnrequiredstringThe column.
new_typerequiredstringNew type, e.g. bigint or varchar(200).
applybooleanRun 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.

Terminal window
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"
]
}
}
}