Skip to main content
Glama
0xhackerfren

Frida Game Hacking MCP

by 0xhackerfren

list_windows

Identify and filter visible application windows by title to target specific processes for game hacking and reverse engineering tasks.

Instructions

List all visible windows.

Args:
    filter_name: Optional filter to match window titles (case-insensitive)

Returns:
    List of windows with handle, title, and associated PID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filter_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'list_windows' MCP tool. Enumerates all visible top-level windows using win32gui.EnumWindows, filters by title if specified, retrieves PID and window geometry, and returns a structured list of windows.
    @mcp.tool()
    def list_windows(filter_name: str = "") -> Dict[str, Any]:
        """
        List all visible windows.
        
        Args:
            filter_name: Optional filter to match window titles (case-insensitive)
        
        Returns:
            List of windows with handle, title, and associated PID.
        """
        if not SCREENSHOT_AVAILABLE:
            return {"error": "Screenshot support not available. Install: pip install pywin32 pillow"}
        
        windows = []
        
        def enum_callback(hwnd, _):
            if win32gui.IsWindowVisible(hwnd):
                title = win32gui.GetWindowText(hwnd)
                if title:
                    if filter_name and filter_name.lower() not in title.lower():
                        return True
                    try:
                        _, pid = win32process.GetWindowThreadProcessId(hwnd)
                        rect = win32gui.GetWindowRect(hwnd)
                        width = rect[2] - rect[0]
                        height = rect[3] - rect[1]
                        if width > 0 and height > 0:
                            windows.append({
                                "hwnd": hwnd,
                                "title": title,
                                "pid": pid,
                                "x": rect[0],
                                "y": rect[1],
                                "width": width,
                                "height": height
                            })
                    except:
                        pass
            return True
        
        try:
            win32gui.EnumWindows(enum_callback, None)
            return {"count": len(windows), "windows": windows}
        except Exception as e:
            return {"error": f"Failed to enumerate windows: {str(e)}"}
  • The 'list_windows' tool is registered and listed in the capabilities under the 'window_interaction' category in the list_capabilities tool.
    "window_interaction": [
        "list_windows", "screenshot_window", "screenshot_screen",
        "send_key_to_window", "focus_window"
    ],
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool lists 'visible windows' and returns specific fields, but doesn't cover critical aspects like whether this requires elevated permissions, how it handles hidden or minimized windows, potential rate limits, or error conditions. For a tool with system-level access (inferred from sibling tools), this lack of behavioral context is a significant gap.

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 perfectly structured with a clear purpose statement followed by separate Args and Returns sections. Every sentence adds value: the first states what the tool does, the second explains the parameter, and the third describes the return format. There's zero redundancy or unnecessary 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 moderate complexity (listing system windows), no annotations, and the presence of an output schema (implied by 'Returns' statement), the description is reasonably complete. It covers purpose, parameter usage, and return structure. However, it lacks behavioral context about permissions, limitations, or error handling that would be important for a system tool.

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 'filter_name' by explaining it's an 'Optional filter to match window titles (case-insensitive)', which goes beyond the schema's minimal title 'Filter Name' and 0% coverage. This clarifies the parameter's purpose and behavior effectively, though it doesn't specify format examples or advanced filtering options.

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 'all visible windows', which is specific and unambiguous. It distinguishes itself from siblings like 'focus_window' or 'screenshot_window' by being a listing operation rather than an action on a specific window. However, it doesn't explicitly differentiate from other listing tools like 'list_processes' or 'list_modules' beyond the resource type.

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

Usage Guidelines3/5

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

The description implies usage when needing to enumerate windows, but provides no explicit guidance on when to use this versus alternatives like 'list_processes' for processes or 'focus_window' for interacting with a specific window. There's no mention of prerequisites, performance considerations, or typical use cases, leaving usage context to inference.

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