rename_variable
Rename a local variable or parameter in the Ghidra decompiler by identifying its function via address or name.
Instructions
Rename a local variable or parameter as shown in the decompiler. Identify the function by function_address (preferred) or function_name.
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": {
"old_name": "<old_name>",
"new_name": "<new_name>"
},
"name": "rename_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| new_name | Yes | ||
| old_name | Yes | ||
| function_name | No | ||
| function_address | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||