ghidralens
v0.1.1Interactive Ghidra views in your AI client: decompile, rename, and navigate a binary.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
open_binary Open binary
Load an executable into the Ghidra session and run auto-analysis. Slow the first time for a given file (seconds to minutes); cached in the Ghidra project afterwards. Must be called before anything else.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the executable |
analyze | boolean | Run auto-analysis. Only set false if already analysed. |
program_info Program info
What is currently open: format, architecture, function count.
decompile Decompile function
Decompile one function to C and show it in an interactive view. Identify the function by address (hex) or by name.
| Parameter | Type | Description |
|---|---|---|
address | string | Entry point, e.g. 0x140001000 |
name | string | Function name, e.g. main |
list_functions List functions
Browse the program's functions in a sortable table. Filter by substring; sort by address, name, size or caller count.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
offset | integer | |
query | string | Case-insensitive name filter |
sort | string |
call_graph Call graph
Draw the callers and callees around one function as a navigable graph. Depth is capped at 3 because call graphs fan out exponentially.
| Parameter | Type | Description |
|---|---|---|
address | string | |
depth | integer | |
name | string |
find_strings Find strings
Search defined string data. Usually the fastest way into an unknown binary - find the message, then look at what references it.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
query | string |
xrefs_to Cross-references
Everything that references an address.
| Parameter | Type | Description |
|---|---|---|
address * | string | Target address, e.g. 0x140001000 |
limit | integer |
rename_symbol Rename symbol
Rename a function, or a local variable inside one. Pass old_name to rename a local; omit it to rename the function itself. This is what a click on an identifier in the decompiler view fires.
| Parameter | Type | Description |
|---|---|---|
address * | string | Address of the function that owns the symbol |
new_name * | string | |
old_name | string | Current local-variable name. Omit to rename the function. |
add_comment Add comment
Attach a plate comment at an address. Persists into the Ghidra project, so notes made here show up in the Ghidra GUI.
| Parameter | Type | Description |
|---|---|---|
address * | string | |
text * | string |
save_program Save program
Write renames and comments back to the Ghidra project on disk. Nothing is lost without this, but nothing is durable with it either.