Skip to main content
Glama
0xhackerfren

Frida Game Hacking MCP

by 0xhackerfren

get_module_imports

List imports for a module in game hacking and reverse engineering, showing name, module, and address details to analyze dependencies and function calls.

Instructions

List imports for a module.

Args:
    module_name: Name of the module
    filter_name: Optional filter for import names

Returns:
    List of imports with name, module, and address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
module_nameYes
filter_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function implementing the get_module_imports tool. It attaches to the Frida session, executes JavaScript to enumerate module imports using Process.findModuleByName and module.enumerateImports(), processes the results, applies optional filtering, and returns a list of imports with details like name, module, type, and address.
    @mcp.tool()
    def get_module_imports(module_name: str, filter_name: str = "") -> Dict[str, Any]:
        """
        List imports for a module.
        
        Args:
            module_name: Name of the module
            filter_name: Optional filter for import names
        
        Returns:
            List of imports with name, module, and address.
        """
        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) {{
                var imports = module.enumerateImports();
                send(JSON.stringify(imports.map(function(i) {{
                    return {{name: i.name, module: i.module, type: i.type,
                            address: i.address ? i.address.toString() : null}};
                }})));
            }} else {{
                send(JSON.stringify([]));
            }}
            """
            
            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
            imports = json.loads(result_data[0]) if result_data else []
            
            if filter_name:
                imports = [i for i in imports if filter_name.lower() in i['name'].lower()]
            
            return {"module": module_name, "count": len(imports), "imports": imports[:100]}
        
        except Exception as 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. It states the tool lists imports but does not describe key behaviors: whether it requires a module to be attached or scanned, if it has rate limits, what happens if the module doesn't exist, or the format of the return list. 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 well-structured and concise, using a clear title line followed by bullet points for arguments and returns. Each sentence adds value without redundancy, making it easy to scan and understand quickly. There is no wasted text or unnecessary elaboration.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is partially complete. It covers the basic purpose and parameters but lacks behavioral details and usage context. The presence of an output schema means the description doesn't need to explain return values, but it should still address operational aspects like prerequisites or error handling.

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 beyond the input schema, which has 0% description coverage. It explains that 'module_name' is the name of the module and 'filter_name' is an optional filter for import names, clarifying their purposes. However, it does not detail syntax or examples, such as format requirements for module names, preventing a score of 5.

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: 'List imports for a module.' This specifies the verb ('List') and resource ('imports for a module'), making it easy to understand what the tool does. However, it does not explicitly differentiate from sibling tools like 'get_module_exports' or 'get_module_info,' which prevents a score of 5.

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 lacks context about prerequisites, such as whether a module must be loaded or scanned first, and does not mention sibling tools like 'get_module_exports' for related functionality. This omission leaves the agent without clear usage instructions.

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