Skip to main content
Glama
0xhackerfren

Frida Game Hacking MCP

by 0xhackerfren

get_module_info

Retrieve detailed information about a specific game module, including its base address, size, and export count for reverse engineering analysis.

Instructions

Get detailed information about a specific module.

Args:
    module_name: Name of the module (e.g., "game.dll")

Returns:
    Module details including base, size, exports count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
module_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_module_info' tool. It uses Frida to find the module by name, enumerates imports and exports count, and returns JSON with module details including name, base address, size, path, and counts.
    @mcp.tool()
    def get_module_info(module_name: str) -> Dict[str, Any]:
        """
        Get detailed information about a specific module.
        
        Args:
            module_name: Name of the module (e.g., "game.dll")
        
        Returns:
            Module details including base, size, exports count.
        """
        global _session
        
        if not _session.is_attached():
            return {"error": "Not attached. Use attach() first."}
        
        try:
            script_code = f"""
            var module = Process.findModuleByName("{module_name}");
            if (module) {{
                send(JSON.stringify({{
                    name: module.name, base: module.base.toString(), size: module.size,
                    path: module.path, imports: module.enumerateImports().length,
                    exports: module.enumerateExports().length
                }}));
            }} else {{
                send(JSON.stringify({{error: "Module not found"}}));
            }}
            """
            
            result_data = []
            def on_message(message, data):
                if message['type'] == 'send':
                    result_data.append(message['payload'])
            
            script = _session.session.create_script(script_code)
            script.on('message', on_message)
            script.load()
            script.unload()
            
            import json
            return json.loads(result_data[0]) if result_data else {"error": "No response"}
        
        except Exception as e:
            return {"error": f"Failed to get module info: {str(e)}"}
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. While it mentions the tool 'Returns: Module details including base, size, exports count,' it lacks critical information such as whether this is a read-only operation, if it requires specific permissions or session states, error handling, or performance considerations. For a tool with no annotation coverage, this is a significant gap in transparency.

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 well-structured and concise, using clear sections for 'Args' and 'Returns' without unnecessary words. Every sentence earns its place by directly contributing to understanding the tool's functionality and parameters, making it easy to parse and front-loaded with essential information.

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

Completeness4/5

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

Given the tool's low complexity (one parameter) and the presence of an output schema (which handles return values), the description is reasonably complete. It covers the purpose, parameter example, and return content, but lacks usage guidelines and behavioral details, which are important for a tool in a debugging/analysis context with many siblings. This minor gap prevents a perfect score.

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

Parameters4/5

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

The description adds meaningful context for the single parameter 'module_name' by providing an example ('e.g., "game.dll"'), which clarifies the expected format beyond the schema's basic type definition. Since schema description coverage is 0%, this example compensates well, though it doesn't fully detail constraints or validation rules. With only one parameter, the baseline is high, and the example adds sufficient value.

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 tool's purpose with a specific verb ('Get detailed information') and resource ('about a specific module'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'list_modules' (which likely lists all modules) or 'get_module_exports' (which focuses on exports), leaving some ambiguity about when to choose this over alternatives.

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. It doesn't mention sibling tools such as 'list_modules' (for listing all modules) or 'get_module_exports' (for export-specific details), nor does it specify prerequisites or contexts for usage. This leaves the agent without explicit direction on tool selection.

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/0xhackerfren/frida-game-hacking-mcp'

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