Skip to main content
Glama
0xhackerfren

Frida Game Hacking MCP

by 0xhackerfren

get_module_exports

List exported functions and variables from a specified module to analyze game code structure for reverse engineering and memory manipulation.

Instructions

List exports from a module.

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

Returns:
    List of exports with name and address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
module_nameYes
filter_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_module_exports' tool. It uses Frida to find the module by name, enumerate its exports, filter if specified, and return the list of exports with names, types, and addresses.
    @mcp.tool()
    def get_module_exports(module_name: str, filter_name: str = "") -> Dict[str, Any]:
        """
        List exports from a module.
        
        Args:
            module_name: Name of the module
            filter_name: Optional filter for export names
        
        Returns:
            List of exports with name 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 exports = module.enumerateExports();
                send(JSON.stringify(exports.map(function(e) {{
                    return {{name: e.name, type: e.type, address: e.address.toString()}};
                }})));
            }} 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
            exports = json.loads(result_data[0]) if result_data else []
            
            if filter_name:
                exports = [e for e in exports if filter_name.lower() in e['name'].lower()]
            
            return {"module": module_name, "count": len(exports), "exports": exports[:100]}
        
        except Exception as e:
            return {"error": f"Failed to get exports: {str(e)}"}
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral context. It mentions the return format ('List of exports with name and address') but doesn't disclose important traits like whether this is a read-only operation, potential performance impacts, error conditions, or how the filtering works. The description doesn't contradict annotations since none exist.

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

Conciseness4/5

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

The description is efficiently structured with a clear purpose statement followed by Args and Returns sections. Each sentence serves a distinct purpose, though the parameter explanations could be more informative given the 0% schema coverage.

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 has an output schema (which handles return values), 2 parameters with 0% schema coverage, and no annotations, the description is minimally adequate. It covers the basic purpose and return format but lacks sufficient parameter details and behavioral context for a tool that interacts with module exports.

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

Parameters3/5

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

Schema description coverage is 0%, so the schema provides no parameter documentation. The description adds basic meaning by explaining 'module_name' as 'Name of the module' and 'filter_name' as 'Optional filter for export names', but doesn't elaborate on format expectations, constraints, or examples. This provides minimal compensation for the schema gap.

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 verb 'List' and resource 'exports from a module', making the purpose explicit. It distinguishes from siblings like 'get_module_imports' by focusing on exports rather than imports, but doesn't explicitly contrast with other export-related tools (none exist in the sibling list).

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, timing considerations, or compare it to similar tools like 'get_module_info' or 'resolve_symbol' that might provide overlapping functionality.

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