get_pseudocode
Extract pseudocode for a specific function in binary files using Ghidra, enabling precise reverse-engineering and analysis through function name input.
Instructions
Get pseudocode for a specific function by name.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- main.py:74-82 (handler)Handler function for the 'get_pseudocode' tool. Retrieves and returns the pseudocode for the specified function from the Ghidra context loaded via setup_context.@mcp.tool() async def get_pseudocode(name: str) -> str: """Get pseudocode for a specific function by name.""" if not ctx_ready: return "❌ Context not ready. Run `setup_context()` first." for f in ctx.get("functions", []): if f["name"] == name: return f["pseudocode"] return f"❌ Function '{name}' not found."