Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
new_nameYes
old_nameYes
function_nameNo
function_addressNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It implies a mutation but never states whether the rename persists to the IDA database, whether the decompiler/function context is required, or what happens if the variable is not found. For a zero-annotation mutation tool this is a significant gap.

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

Conciseness5/5

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

Two tight sentences with the core action front-loaded and the function-identification hint immediately after. No filler or redundancy.

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

Completeness3/5

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

An output schema exists, so return values need not be described. With no annotations and 0% parameter coverage, the description should at least note prerequisites (e.g., decompilation must be available) and failure behavior; those are missing, leaving it only partially complete for a mutation tool.

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 0%, so the description must compensate. It does add real value by specifying the preferred identifier (function_address) over the fallback (function_name), but old_name and new_name receive no semantic detail (e.g., must the old_name match the decompiler's current output exactly).

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

Purpose5/5

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

States a specific verb (rename) and resource (local variable or parameter) scoped to the decompiler view. This clearly distinguishes it from sibling renamers like rename_function, rename_data, and rename_function_by_address, which target different symbol classes.

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

Usage Guidelines4/5

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

The description gives explicit precedence guidance for identifying the owning function: 'function_address (preferred) or function_name'. However, it offers no when-to-use/when-not framing relative to the sibling rename tools, so the routing is only partially covered.

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