Skip to main content
Glama

get_structure

Extract structure details from binary files by name to analyze data layouts in reverse engineering workflows.

Instructions

Get details of a specific structure by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • main.py:91-99 (handler)
    The handler function for the 'get_structure' tool. It retrieves the details of a specific structure by name from the Ghidra context loaded via setup_context. Registered using the @mcp.tool() decorator.
    @mcp.tool()
    async def get_structure(name: str) -> dict:
        """Get details of a specific structure by name."""
        if not ctx_ready:
            return {"error": "Context not ready. Run `setup_context()` first."}
        for s in ctx.get("data_types", {}).get("structures", []):
            if s["name"] == name:
                return s
        return {"error": f"Structure '{name}' not found."}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Bamimore-Tomi/ghidra_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server