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.
| Capability | code.change_set_apply |
|---|---|
| Area | Code insight and refactoring |
| Access | changes files |
| Reaches | — |
| Rights | write |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
idrequired | string | The set. |
files | array of string | Only these files of the set. |
hunks | object | Only these hunks (1-based numbers from change_set_diff) of these files, by path. |
dry_run | boolean | change_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.
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" ] } }}