Skip to content

preview_column_edit

MCP tools › Code insight and refactoring

Preview a column (block) edit as an ⌥-drag selection does it: the rectangle between two corners (0-based line and column) selects the same columns on every line, lines shorter than that get a caret at their end, and the replacement is typed into each. Returns the parts selected as character ranges and the resulting text; the file is not written.

Its results carry text from files, language_server: the client is told to treat that as data, never as instructions.

Capabilitycode.preview_column_edit
AreaCode insight and refactoring
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative file.
from_linerequiredinteger0-based line of one corner.minimum 0
from_columnrequiredinteger0-based column of that corner.minimum 0
to_linerequiredinteger0-based line of the other corner.minimum 0
to_columnrequiredinteger0-based column of the other corner.minimum 0
replacementrequiredstringText typed into every line of the rectangle (empty deletes it).

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 preview_column_edit '{"path":"<string>","from_line":1,"from_column":1,"to_line":1,"to_column":1,"replacement":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"path",
"from_line",
"from_column",
"to_line",
"to_column",
"replacement"
],
"properties": {
"path": {
"description": "Workspace-relative file.",
"type": "string"
},
"from_line": {
"description": "0-based line of one corner.",
"type": "integer",
"minimum": 0
},
"from_column": {
"description": "0-based column of that corner.",
"type": "integer",
"minimum": 0
},
"to_line": {
"description": "0-based line of the other corner.",
"type": "integer",
"minimum": 0
},
"to_column": {
"description": "0-based column of the other corner.",
"type": "integer",
"minimum": 0
},
"replacement": {
"description": "Text typed into every line of the rectangle (empty deletes it).",
"type": "string"
}
}
}