Skip to content

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.

Capabilitycode.change_set_edit
AreaCode insight and refactoring
Accesschanges files
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
idrequiredstringThe set.
pathstringWorkspace-relative file to propose an edit of.
textstringThe file's whole new text (also creates a file).
old_textstringText to replace in the file's proposed text (else its current text); must occur exactly once unless replace_all.
new_textstringReplacement for old_text.
replace_allbooleanReplace every occurrence of old_text (default false).
case_sensitivebooleanMatch old_text case-sensitively (default true).
deletebooleanPropose deleting the file.
modelstringUpdate the set's model.
costobjectUpdate what the work cost so far (replaces the earlier value).
cost.input_tokensintegerInput tokens.minimum 0
cost.output_tokensintegerOutput tokens.minimum 0
cost.amountnumberMoney spent.
cost.currencystringCurrency 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.

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