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.
| Capability | code.suggest_names |
|---|---|
| Area | Code insight and refactoring |
| Access | reads only |
| Reaches | — |
| Rights | none |
| Dry run | none |
Arguments
| Argument | Type | Description |
|---|---|---|
expression | string | The expression the variable gets, e.g. s.length() or this.items. |
type_name | string | Its type, e.g. List<String>, if known. |
element | boolean | Name 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.
ferris-idea call ~/my-project suggest_namesInput 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" ] } }}