Skip to main content
Glama

Rename Local Variable

rename_local_variable

Change a local variable's name in IDA Pro's Hex-Rays decompiled function by providing the function address and the old and new identifiers.

Instructions

Rename local variable (Hex-Rays).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNoTimeout in seconds
new_nameYesNew variable name (valid C identifier)
old_nameYesOld local variable name (exact match)
instance_idNoInstance id override
function_addressYesFunction start or internal address (hex or decimal)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.7

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden and says nothing beyond what it is. It does not disclose whether the decompiler must be active, whether the name must be unique, what happens on a name collision, or that the change is a persistent mutation to the IDB. Only the terse '(Hex-Rays)' note hints at any behavioral constraint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single short, front-loaded sentence with zero waste, but it is under-specified rather than genuinely concise — the brevity comes at the cost of any behavioral or usage content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a five-parameter mutating tool with no annotations and no output schema, yet the description gives no state prerequisites, no error semantics, and no confirmation of what changes persist. For a rename operation on a specific function's locals, that leaves significant gaps for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters (including function_address as hex-or-decimal and old_name as exact match) are documented in the schema itself. The description adds no parameter-level meaning beyond that, which is the expected baseline when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Rename local variable') and the parenthetical '(Hex-Rays)' signals the decompiler context, which scopes it to decompiler-local variables rather than stack or global ones. It does not explicitly contrast with the nearby rename_global_variable / rename_function siblings, but the name and resource are unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No when-to-use guidance, no prerequisites (e.g., that the function must be decompiled with Hex-Rays first), and no reference to alternatives such as rename_global_variable or set_local_variable_type. The agent has to infer entirely from sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.