Skip to main content
Glama

get_pseudocode

Extract pseudocode from binary functions to analyze program logic and structure during reverse engineering.

Instructions

Get pseudocode for a specific function by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • main.py:74-82 (handler)
    The handler function for the 'get_pseudocode' tool, decorated with @mcp.tool() for registration in FastMCP. It retrieves pseudocode for a given function name from the Ghidra context.
    @mcp.tool()
    async def get_pseudocode(name: str) -> str:
        """Get pseudocode for a specific function by name."""
        if not ctx_ready:
            return "❌ Context not ready. Run `setup_context()` first."
        for f in ctx.get("functions", []):
            if f["name"] == name:
                return f["pseudocode"]
        return f"❌ Function '{name}' not found."
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe how it behaves—e.g., whether it returns a single result or multiple, error handling for invalid names, format of the pseudocode output, or any side effects. This leaves significant gaps in understanding the tool's operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words. It's front-loaded with the core action and target, making it easy to parse quickly. Every part of the sentence contributes directly to understanding the tool's purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of retrieving pseudocode (which may involve parsing or transformation), no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't address what the output looks like, error conditions, or how it interacts with sibling tools, leaving the agent with insufficient context for reliable use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, with one parameter 'name' documented only by its title. The description adds minimal semantics by specifying it's 'for a specific function by name', implying 'name' refers to a function identifier. However, it doesn't clarify format (e.g., case sensitivity, naming conventions) or provide examples, which is insufficient given the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get pseudocode') and the target ('for a specific function by name'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential siblings like 'get_function_definition' or 'list_functions', which might retrieve similar information but in different formats or scopes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_function_definition' and 'list_functions' available, there's no indication of whether this tool is preferred for pseudocode retrieval, what distinguishes it from those tools, or any prerequisites for its use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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