unload_script
Remove a custom script from memory to stop its execution and free resources in game hacking or reverse engineering workflows.
Instructions
Unload a custom script.
Args:
name: Name of the script to unload
Returns:
Unload status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- The handler function for the 'unload_script' MCP tool. It unloads a previously loaded custom Frida script by its name from the global session state, removing it from the custom_scripts dictionary after calling unload() on the script object.@mcp.tool() def unload_script(name: str) -> Dict[str, Any]: """ Unload a custom script. Args: name: Name of the script to unload Returns: Unload status. """ global _session if name not in _session.custom_scripts: return {"error": f"Script '{name}' not found"} try: _session.custom_scripts[name].unload() del _session.custom_scripts[name] return {"success": True, "name": name} except Exception as e: return {"error": f"Failed to unload script: {str(e)}"}