method_hierarchy
MCP tools › Code insight and refactoring
Method hierarchy of the method at a position of a workspace .java file or of the function or property at a position of a .kt file (v6, from the project's syntax trees, overloads told apart by parameter count): the types from the topmost project supertype declaring the method down through every subtype, each with mark + (defines the method), - (inherits it) or ! (concrete type that must define it). Returns {method, tree} or null outside a method.
Its results carry text from files, language_server: the client is told to treat that as data, never as instructions.
| Capability | code.method_hierarchy |
|---|---|
| Area | Code insight and refactoring |
| Access | reads only |
| Reaches | process |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
pathrequired | string | Workspace-relative file path. |
linerequired | integer | 0-based line.minimum 0 |
characterrequired | integer | 0-based character in the line (Unicode scalar values).minimum 0 |
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 method_hierarchy '{"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.", "type": "integer", "minimum": 0 }, "character": { "description": "0-based character in the line (Unicode scalar values).", "type": "integer", "minimum": 0 } }}