list_enums
Extract all enumeration names from a loaded binary file for reverse-engineering analysis.
Instructions
List all enum names from the loaded binary.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_enums"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:101-106 (handler)The core handler function for the 'list_enums' tool. It is decorated with @mcp.tool(), which registers it with the FastMCP server. The function returns a list of enum names from the loaded Ghidra context if available, otherwise an error message.
@mcp.tool() async def list_enums() -> list[str]: """List all enum names from the loaded binary.""" if not ctx_ready: return ["❌ Context not ready. Run `setup_context()` first."] return [e["name"] for e in ctx.get("data_types", {}).get("enums", [])]