Skip to content

change_set_apply

MCP tools › Code insight and refactoring

Apply a change set: its pending files, only files, or only chosen hunks (from change_set_diff); rejected hunks never, unchosen hunks are dropped. Dry run by default: hunks and conflict per file. dry_run=false needs the user-granted write right (secret-read for secret-looking files); if any chosen file changed since its edit was proposed, nothing is written. Writes via the open editor as one undo step or to disk, records local history, logged.

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

Capabilitycode.change_set_apply
AreaCode insight and refactoring
Accesschanges files
Reaches—
Rightswrite
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
idrequiredstringThe set.
filesarray of stringOnly these files of the set.
hunksobjectOnly these hunks (1-based numbers from change_set_diff) of these files, by path.
dry_runbooleanchange_set_apply only: show what would be written (default true).

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_set_apply '{"id":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"description": "The set.",
"type": "string"
},
"files": {
"description": "Only these files of the set.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"hunks": {
"description": "Only these hunks (1-based numbers from `change_set_diff`) of these files, by path.",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
}
}
},
"dry_run": {
"description": "`change_set_apply` only: show what would be written (default true).",
"type": [
"boolean",
"null"
]
}
}
}