list_structures
Extract and display all structure names from a binary file using Ghidra MCP Server, enabling efficient analysis and reverse-engineering of code.
Instructions
List all structure names from the loaded binary.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- main.py:84-89 (handler)The handler function for the 'list_structures' MCP tool. It checks if context is ready and returns the list of structure names from the Ghidra context JSON.@mcp.tool() async def list_structures() -> list[str]: """List all structure names from the loaded binary.""" if not ctx_ready: return ["❌ Context not ready. Run `setup_context()` first."] return [s["name"] for s in ctx.get("data_types", {}).get("structures", [])]
- main.py:84-84 (registration)The @mcp.tool() decorator registers the list_structures function as an MCP tool.@mcp.tool()