Skip to content

suggest_names

MCP tools › Code insight and refactoring

Suggested variable names for a value or for one element of a collection, from its expression and type, best first.

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

Capabilitycode.suggest_names
AreaCode insight and refactoring
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
expressionstringThe expression the variable gets, e.g. s.length() or this.items.
type_namestringIts type, e.g. List<String>, if known.
elementbooleanName one element of the expression (a loop variable) instead of the value itself.

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 suggest_names
Input schema as JSON
{
"type": "object",
"properties": {
"expression": {
"description": "The expression the variable gets, e.g. `s.length()` or `this.items`.",
"type": [
"string",
"null"
]
},
"type_name": {
"description": "Its type, e.g. `List<String>`, if known.",
"type": [
"string",
"null"
]
},
"element": {
"description": "Name one element of the expression (a loop variable) instead of the value itself.",
"type": [
"boolean",
"null"
]
}
}
}