refactor_inline_variable
Replaces all usages of a variable with its value and removes the declaration, simplifying code while preserving behavior.
Instructions
Inline a variable by replacing all usages with its value and removing the declaration.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"filePath": "<filePath>",
"variableName": "<variableName>",
"line": "<line>"
},
"name": "refactor_inline_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Line number of the variable declaration | |
| path | Yes | Root path of the repository | |
| apply | No | Apply changes (default: false) | |
| filePath | Yes | Path to the file | |
| variableName | Yes | Name of the variable to inline |