change_signature
MCP tools › Code insight and refactoring
Change Signature of the function at a position of a workspace file: reorder, rename, remove or add parameters, and rewrite its declarations and every call to match. The language server only finds the declaration and the references; Ferris IDEA rewrites the lists. Without parameters it returns the current list. dry_run defaults to true and returns the edits per file and the calls left unchanged (skipped, with the reason); dry_run=false writes the files, refusing if any changed since.
Its results carry text from files, language_server: the client is told to treat that as data, never as instructions.
| Capability | code.change_signature |
|---|---|
| Area | Code insight and refactoring |
| Access | changes files |
| Reaches | process |
| Rights | write |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative file path. |
linerequired | integer | 0-based line of the function's name (declaration or a call).minimum 0 |
characterrequired | integer | 0-based character in the line (Unicode scalar values).minimum 0 |
parameters | string | The new parameter list without brackets and without the receiver (Rust self, Python
self/cls), e.g. b: &str, a: i32, flag: bool = false. Parameters keep their arguments by
name; a new one needs = value, the value existing calls get. Omit it to read the current
list. |
dry_run | boolean | Only report the edits (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_signature '{"path":"<string>","line":1,"character":1}'Input schema as JSON
{ "type": "object", "required": [ "path", "line", "character" ], "properties": { "path": { "description": "Workspace-relative file path.", "type": "string" }, "line": { "description": "0-based line of the function's name (declaration or a call).", "type": "integer", "minimum": 0 }, "character": { "description": "0-based character in the line (Unicode scalar values).", "type": "integer", "minimum": 0 }, "parameters": { "description": "The new parameter list without brackets and without the receiver (Rust `self`, Python\n`self`/`cls`), e.g. `b: &str, a: i32, flag: bool = false`. Parameters keep their arguments by\nname; a new one needs `= value`, the value existing calls get. Omit it to read the current\nlist.", "type": [ "string", "null" ] }, "dry_run": { "description": "Only report the edits (default true).", "type": [ "boolean", "null" ] } }}