Rename Symbol
rename_symbolRename code symbols across your entire codebase to maintain consistency and improve readability. This tool updates all references to the symbol automatically.
Instructions
Renames the symbol with the given name_path to new_name throughout the entire codebase.
Note: for languages with method overloading, like Java, name_path may have to include a method's
signature to uniquely identify a method. Returns result summary indicating success or failure.
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": {
"name_path": "<name_path>",
"relative_path": "<relative_path>",
"new_name": "<new_name>"
},
"name": "rename_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name_path | Yes | Name path of the symbol to rename (definitions in the `find_symbol` tool apply). | |
| relative_path | Yes | The relative path to the file containing the symbol to rename. | |
| new_name | Yes | The new name for the symbol. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |