get_pseudocode
Extract pseudocode from binary functions to analyze program logic and structure during reverse engineering.
Instructions
Get pseudocode for a specific function by name.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "get_pseudocode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- main.py:74-82 (handler)The handler function for the 'get_pseudocode' tool, decorated with @mcp.tool() for registration in FastMCP. It retrieves pseudocode for a given function name from the Ghidra 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."