stop_gui
Stop the Claude Code Session Manager web interface to end GUI server sessions and free system resources.
Instructions
Stop the web GUI server
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The function that executes the stop_gui tool logic: terminates the global web server subprocess gracefully or forcefully.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)}" }
- src/claude_session_manager_mcp/server.py:674-682 (registration)Registration of the stop_gui tool with the MCP server in the list_tools function, including its input schema (no parameters).Tool( name="stop_gui", description="Stop the web GUI server", inputSchema={ "type": "object", "properties": {}, "required": [] } )
- Dispatch handler in the main call_tool function that invokes stop_web_gui when the tool name matches.elif name == "stop_gui": result = stop_web_gui()
- Global variable used by stop_gui (and start_gui) to track and manage the web server process._web_server_process: subprocess.Popen | None = None