Skip to main content
Glama
0xhackerfren

Frida Game Hacking MCP

by 0xhackerfren

set_breakpoint

Set a software breakpoint at a memory address to execute JavaScript code when triggered, enabling game debugging and reverse engineering.

Instructions

Set a software breakpoint at address.

Args:
    address: Address for breakpoint
    callback: JavaScript code to execute when hit

Returns:
    Breakpoint status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
callbackNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function that sets a software breakpoint by attaching a Frida Interceptor to the given address, executing an optional JavaScript callback on entry, and storing the script in session state.
    @mcp.tool()
    def set_breakpoint(address: str, callback: str = "") -> Dict[str, Any]:
        """
        Set a software breakpoint at address.
        
        Args:
            address: Address for breakpoint
            callback: JavaScript code to execute when hit
        
        Returns:
            Breakpoint status.
        """
        global _session
        
        if not _session.is_attached():
            return {"error": "Not attached. Use attach() first."}
        
        if address in _session.breakpoints:
            return {"error": f"Breakpoint exists at {address}"}
        
        try:
            addr = int(address, 16) if address.startswith("0x") else int(address)
            callback_code = callback or "console.log('[BP] Hit at ' + this.context.pc);"
            
            script_code = f"""
            Interceptor.attach(ptr("{hex(addr)}"), {{
                onEnter: function(args) {{ {callback_code} }}
            }});
            send("Breakpoint set");
            """
            
            script = _session.session.create_script(script_code)
            script.on('message', lambda m, d: None)
            script.load()
            
            _session.breakpoints[address] = script
            return {"success": True, "address": address}
        
        except Exception as e:
            return {"error": f"Failed to set breakpoint: {str(e)}"}
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 mentions the tool sets a breakpoint and returns status, but fails to explain critical details like whether it requires an active debug session, if it's destructive (modifies memory), potential side effects, or error handling. This leaves significant gaps for safe agent invocation.

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 front-loaded with the core purpose in the first sentence, followed by brief parameter and return explanations. It's efficient with no wasted words, though the structure is basic without explicit sections beyond 'Args' and 'Returns'.

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 complexity (a debugging tool with potential side effects), no annotations, and an output schema (which handles return values), the description is incomplete. It covers the basic action and parameters but misses critical context like session requirements, safety notes, or interaction with sibling tools, making it only minimally viable.

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?

The description adds minimal semantics beyond the input schema: it clarifies that 'address' is for the breakpoint location and 'callback' is JavaScript code to execute when hit. However, with 0% schema description coverage, it doesn't compensate fully—e.g., it lacks details on address format or callback constraints. The baseline is 3 due to some added meaning, but it's inadequate given the coverage 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 action ('Set a software breakpoint') and the target ('at address'), which is specific and unambiguous. It distinguishes from siblings like 'list_breakpoints' or 'remove_breakpoint' by focusing on creation, though it doesn't explicitly differentiate in the description text.

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 like 'hook_function' or 'intercept_module_function', nor does it mention prerequisites such as needing an attached session. Usage is implied by the action but lacks explicit context or exclusions.

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