Skip to content

override_methods

MCP tools › Code insight and refactoring

Override/Implement Methods for the Java (via jdtls) or Kotlin class at a position. Without add: the overridable methods with parameters, declaring class and unimplemented. With add: inserts them with @Override/override and a default body. Dry run unless dry_run false: returns edits and new text; a real call needs the write right and refuses if the file changed meanwhile.

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

Capabilitycode.override_methods
AreaCode insight and refactoring
Accesschanges files
Reachesprocess
Rightswrite
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
pathrequiredstringWorkspace-relative .java or .kt file.
linerequiredinteger0-based line inside the class.minimum 0
characterrequiredinteger0-based character in the line.minimum 0
addarray of stringNames of the methods to add (name or name(Type, …) as listed); empty only lists.
dry_runbooleanWith add: only return the edits and the new text (default true); false writes the file.

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 override_methods '{"path":"<string>","line":1,"character":1}'
Input schema as JSON
{
"type": "object",
"required": [
"path",
"line",
"character"
],
"properties": {
"path": {
"description": "Workspace-relative `.java` or `.kt` file.",
"type": "string"
},
"line": {
"description": "0-based line inside the class.",
"type": "integer",
"minimum": 0
},
"character": {
"description": "0-based character in the line.",
"type": "integer",
"minimum": 0
},
"add": {
"description": "Names of the methods to add (`name` or `name(Type, …)` as listed); empty only lists.",
"type": [
"array",
"null"
],
"items": {
"type": "string"
}
},
"dry_run": {
"description": "With `add`: only return the edits and the new text (default true); false writes the file.",
"type": [
"boolean",
"null"
]
}
}
}