inline_variable
Replace a variable with its assigned value at every usage throughout the project. Specify file path, variable name, and definition line to refactor code.
Instructions
Inline a variable at all usage sites.
Args: project_path: Root directory of the Python project file_path: File path relative to project_path variable_name: Name of the variable to inline line: Line number where variable is defined (1-based)
Returns: JSON with success status and list of changed files
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": {
"project_path": "<project_path>",
"file_path": "<file_path>",
"variable_name": "<variable_name>",
"line": "<line>"
},
"name": "inline_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| file_path | Yes | ||
| variable_name | Yes | ||
| line | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |