Rename Local Variable
rename_local_variableRename a local variable in an IDA Pro Hex-Rays function by providing its function address, exact old name, and a valid C identifier for the new name.
Instructions
Rename local variable (Hex-Rays).
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": {
"function_address": "<function_address>",
"old_name": "<old_name>",
"new_name": "<new_name>"
},
"name": "rename_local_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Timeout in seconds | |
| new_name | Yes | New variable name (valid C identifier) | |
| old_name | Yes | Old local variable name (exact match) | |
| instance_id | No | REQUIRED whenever more than one database is open (from open_database's result or list_databases()); optional only while exactly one instance is live. | |
| function_address | Yes | Function start or internal address (hex or decimal) |