Skip to main content
Glama
imjdl

ghidra-fleet

by imjdl

Rename Variable

rename_variable

Rename local variables or parameters within a function to clarify their purpose and improve readability of decompiled code during reverse engineering.

Instructions

重命名函数内的局部变量/参数。

Input Schema

NameRequiredDescriptionDefault
binaryYes
functionYes
new_nameYes
old_nameYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/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, and it discloses almost nothing: it does not say whether the rename updates all references/xrefs, whether it mutates the binary on disk or only the session view, or whether it can fail on non-local or ambiguous names. Only the bare fact of mutation is implied by the verb.

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?

A single short sentence with no padding, so nothing needs trimming. However, the brevity is under-specification rather than efficiency – the one clause is front-loaded but leaves the agent with nothing actionable beyond the tool name.

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?

An output schema exists, so return values need not be explained, but for a four-required-parameter mutation tool with no annotations and 0% schema coverage the description is far too thin. Key questions an agent needs answered – reference propagation, persistence, failure modes – are left open.

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

Parameters2/5

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

All four parameters (binary, function, old_name, new_name) have 0% schema description coverage, so the description must compensate and does not. It never explains the expected format of binary (path vs. identifier), how function is identified, or whether old_name must match exactly or can be qualified.

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?

The description states a specific verb (重命名/rename) and a specific resource (函数内的局部变量/参数 – a local variable or parameter inside a function), which distinguishes it from the sibling rename_function and rename_data by scope. It does not name those siblings explicitly, but the scope wording is enough for an agent to tell them apart.

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?

There is no guidance on when to use this rather than rename_function, rename_data, or set_local_variable_type, and no prerequisites are stated (e.g. whether the function must first be analyzed/decompiled). The agent must infer the usage entirely from the tool name.

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