get_enum
Retrieve detailed information about a specific enumeration by name from binary files for reverse-engineering analysis.
Instructions
Get details of a specific enum 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_enum"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- main.py:108-116 (handler)The handler function for the 'get_enum' MCP tool. It retrieves enum details by name from the loaded Ghidra context. The @mcp.tool() decorator registers the tool and infers the schema from the function signature and docstring.
@mcp.tool() async def get_enum(name: str) -> dict: """Get details of a specific enum by name.""" if not ctx_ready: return {"error": "Context not ready. Run `setup_context()` first."} for e in ctx.get("data_types", {}).get("enums", []): if e["name"] == name: return e return {"error": f"Enum '{name}' not found."}