stop_gui
Stop the Claude Code Session Manager web interface to end GUI sessions and free system resources.
Instructions
Stop the web GUI server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function that stops the web GUI server by terminating the subprocess, handling graceful shutdown and forceful kill if necessary.def stop_web_gui() -> dict: """Stop the web GUI server.""" global _web_server_process if _web_server_process is None or _web_server_process.poll() is not None: _web_server_process = None return { "success": True, "message": "Web GUI is not running" } try: _web_server_process.terminate() _web_server_process.wait(timeout=5) _web_server_process = None return { "success": True, "message": "Web GUI stopped successfully" } except subprocess.TimeoutExpired: _web_server_process.kill() _web_server_process = None return { "success": True, "message": "Web GUI forcefully stopped" } except Exception as e: return { "success": False, "message": f"Failed to stop web GUI: {str(e)}" }
- Defines the tool schema with no input parameters required.Tool( name="stop_gui", description="Stop the web GUI server", inputSchema={ "type": "object", "properties": {}, "required": [] } )
- src/claude_session_manager_mcp/server.py:733-735 (registration)Registers the tool handler dispatch within the main call_tool function decorated by @mcp.call_tool().elif name == "stop_gui": result = stop_web_gui()
- Global variable tracking the web server subprocess used by start_gui and stop_gui tools.# Global variable to track web server process _web_server_process: subprocess.Popen | None = None