Rename symbol
rename_symbolRename a function or local variable in Ghidra's decompiler view. Provide the function address and new name; include old_name to rename a local instead.
Instructions
Rename a function, or a local variable inside one. Pass old_name to rename a local; omit it to rename the function itself. This is what a click on an identifier in the decompiler view fires.
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": {
"address": "<address>",
"new_name": "<new_name>"
},
"name": "rename_symbol"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Address of the function that owns the symbol | |
| new_name | Yes | ||
| old_name | No | Current local-variable name. Omit to rename the function. |