Skip to main content
Glama

get_function_definition

Retrieve function details by name to analyze binary code structure and behavior for reverse-engineering tasks.

Instructions

Get details of a specific function definition by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • main.py:126-133 (handler)
    Handler function that retrieves the details of a specific function definition by name from the loaded Ghidra context JSON. Returns the definition dict or an error.
    async def get_function_definition(name: str) -> dict: """Get details of a specific function definition by name.""" if not ctx_ready: return {"error": "Context not ready. Run `setup_context()` first."} for f in ctx.get("data_types", {}).get("function_definitions", []): if f["name"] == name: return f return {"error": f"Function definition '{name}' not found."}
  • main.py:125-125 (registration)
    Registers the get_function_definition tool with the MCP server using the @mcp.tool() decorator.
    @mcp.tool()

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