Skip to main content
Glama

get_session_info

Retrieve current session details including attached processes, active hooks, and memory scan status for game hacking and reverse engineering.

Instructions

Get current session information. Returns: Session state including attached process, hooks, scan state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'get_session_info' tool. It returns a dictionary with the current Frida session status, including whether attached to a process, PID, process name, scan state summary, number of active hooks, breakpoints, and custom scripts.
    @mcp.tool() def get_session_info() -> Dict[str, Any]: """ Get current session information. Returns: Session state including attached process, hooks, scan state. """ return { "attached": _session.is_attached(), "pid": _session.pid, "process_name": _session.process_name, "spawned": _session.spawned, "scan_active": _session.scan_state.scan_active, "scan_results_count": len(_session.scan_state.results), "scan_value_type": _session.scan_state.value_type, "active_hooks": len(_session.hooks), "active_breakpoints": len(_session.breakpoints), "custom_scripts": len(_session.custom_scripts) }
  • The FridaSession class and global _session instance that store all the state queried by get_session_info. Includes is_attached() method used in the handler.
    @dataclass class HookInfo: """Information about an active hook.""" address: str script: Any hook_type: str description: str = "" class FridaSession: """Manages Frida session state.""" def __init__(self): self.device: Optional[Any] = None self.session: Optional[Any] = None self.pid: Optional[int] = None self.process_name: Optional[str] = None self.spawned: bool = False self.scan_state: ScanState = ScanState() self.hooks: Dict[str, HookInfo] = {} self.breakpoints: Dict[str, Any] = {} self.custom_scripts: Dict[str, Any] = {} def is_attached(self) -> bool: return self.session is not None and not self.session.is_detached def reset(self): self.session = None self.pid = None self.process_name = None self.spawned = False self.scan_state = ScanState() self.hooks.clear() self.breakpoints.clear() self.custom_scripts.clear() # Global session instance _session = FridaSession()

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