Skip to main content
Glama
0xhackerfren

Frida Game Hacking MCP

by 0xhackerfren

list_modules

Lists all loaded modules (DLLs/shared libraries) with base address, size, and path information for game hacking and reverse engineering analysis.

Instructions

List all loaded modules (DLLs/shared libraries).

Returns:
    List of modules with base address, size, and path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The primary handler for the 'list_modules' MCP tool. It checks if attached to a process, injects a Frida script to enumerate modules using Process.enumerateModules(), collects the results via message handler, parses JSON, and returns count and module list (name, base, size, path).
    @mcp.tool()
    def list_modules() -> Dict[str, Any]:
        """
        List all loaded modules (DLLs/shared libraries).
        
        Returns:
            List of modules with base address, size, and path.
        """
        global _session
        
        if not _session.is_attached():
            return {"error": "Not attached. Use attach() first."}
        
        try:
            script_code = """
            var modules = Process.enumerateModules();
            var result = modules.map(function(m) {
                return {name: m.name, base: m.base.toString(), size: m.size, path: m.path};
            });
            send(JSON.stringify(result));
            """
            
            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()
            
            if not result_data:
                return {"error": "Failed to enumerate modules"}
            
            import json
            modules = json.loads(result_data[0])
            return {"count": len(modules), "modules": modules}
        
        except Exception as e:
            return {"error": f"Failed to list modules: {str(e)}"}
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the return format (list with base address, size, path) but omits behavioral traits like permissions needed, rate limits, or whether it's read-only. It adds some value but is incomplete for a tool with zero annotation coverage.

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 front-loaded with the core purpose in the first sentence and efficiently details the return values in the second. Every sentence adds value without waste, making it appropriately sized and structured.

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 (0 parameters, output schema exists), the description is mostly complete. It explains what the tool does and the return format, but lacks usage guidelines and behavioral context, which are minor gaps in this simple case.

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 tool has 0 parameters with 100% schema description coverage, so the schema fully documents inputs. The description adds no parameter details, which is acceptable here as there are no parameters to explain, aligning with the baseline for zero parameters.

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

Purpose5/5

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

The description clearly states the specific action ('List all loaded modules') and resource ('modules (DLLs/shared libraries)'), distinguishing it from siblings like list_processes or list_windows by focusing on modules. It provides precise scope without tautology.

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 such as get_module_info or list_processes. The description lacks context about prerequisites, exclusions, or comparisons with sibling tools, offering only basic 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