change_set_edit
MCP tools › Code insight and refactoring
Propose an edit to a file in a change set: whole new text (creates a file), an old_text/new_text replacement, or delete. An edit back to the file's base drops it; applied, rejected or undone files take no more edits. model and cost update metadata. Returns status and hunks. Writes nothing to the project, needs no right; paths stay outside .ferris-idea/ and .git/, secret-like files need secret-read.
Its results carry text from files, records: the client is told to treat that as data, never as instructions.
| Capability | code.change_set_edit |
|---|---|
| Area | Code insight and refactoring |
| Access | changes files |
| Reaches | — |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
idrequired | string | The set. |
path | string | Workspace-relative file to propose an edit of. |
text | string | The file's whole new text (also creates a file). |
old_text | string | Text to replace in the file's proposed text (else its current text); must occur exactly
once unless replace_all. |
new_text | string | Replacement for old_text. |
replace_all | boolean | Replace every occurrence of old_text (default false). |
case_sensitive | boolean | Match old_text case-sensitively (default true). |
delete | boolean | Propose deleting the file. |
model | string | Update the set's model. |
cost | object | Update what the work cost so far (replaces the earlier value). |
cost.input_tokens | integer | Input tokens.minimum 0 |
cost.output_tokens | integer | Output tokens.minimum 0 |
cost.amount | number | Money spent. |
cost.currency | string | Currency of amount, e.g. USD. |
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_edit '{"id":"<string>"}'Input schema as JSON
{ "properties": { "id": { "description": "The set.", "type": "string" }, "path": { "description": "Workspace-relative file to propose an edit of.", "type": [ "string", "null" ] }, "text": { "description": "The file's whole new text (also creates a file).", "type": [ "string", "null" ] }, "old_text": { "description": "Text to replace in the file's proposed text (else its current text); must occur exactly\nonce unless `replace_all`.", "type": [ "string", "null" ] }, "new_text": { "description": "Replacement for `old_text`.", "type": [ "string", "null" ] }, "replace_all": { "description": "Replace every occurrence of `old_text` (default false).", "type": [ "boolean", "null" ] }, "case_sensitive": { "description": "Match `old_text` case-sensitively (default true).", "type": [ "boolean", "null" ] }, "delete": { "description": "Propose deleting the file.", "type": [ "boolean", "null" ] }, "model": { "description": "Update the set's model.", "type": [ "string", "null" ] }, "cost": { "description": "Update what the work cost so far (replaces the earlier value).", "anyOf": [ { "$ref": "#/$defs/CostArgs" }, { "type": "null" } ] } }, "$defs": { "CostArgs": { "description": "What the work cost (`SPEC-0340` behaviour 2).", "type": "object", "properties": { "input_tokens": { "description": "Input tokens.", "type": [ "integer", "null" ], "minimum": 0 }, "output_tokens": { "description": "Output tokens.", "type": [ "integer", "null" ], "minimum": 0 }, "amount": { "description": "Money spent.", "type": [ "number", "null" ] }, "currency": { "description": "Currency of `amount`, e.g. USD.", "type": [ "string", "null" ] } } } }, "required": [ "id" ], "type": "object"}