Skip to main content
Glama
es6kr

claude-session-manager

by es6kr

start_gui

Launch the web interface to manage Claude sessions through your browser, providing visual control over session operations.

Instructions

Start the web GUI for session management and open it in browser

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoPort to run the web server on (default: 5050)
open_browserNoWhether to open browser automatically (default: true)

Implementation Reference

  • Core implementation of the 'start_gui' tool: launches a subprocess running the web GUI Flask app via module 'claude_session_manager_mcp.web', handles already-running check, browser opening, error handling, and returns status with URL and PID.
    def start_web_gui(port: int = 5050, open_browser: bool = True) -> dict:
        """Start the web GUI server."""
        global _web_server_process
    
        # Check if already running
        if _web_server_process is not None and _web_server_process.poll() is None:
            url = f"http://localhost:{port}"
            if open_browser:
                webbrowser.open(url)
            return {
                "success": True,
                "message": "Web GUI is already running",
                "url": url,
                "pid": _web_server_process.pid
            }
    
        try:
            # Get the package directory
            package_dir = Path(__file__).parent.parent.parent
    
            # Start Flask server as subprocess
            _web_server_process = subprocess.Popen(
                [sys.executable, "-m", "claude_session_manager_mcp.web"],
                cwd=str(package_dir),
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE,
                start_new_session=True
            )
    
            # Wait briefly to check if it started successfully
            import time
            time.sleep(1)
    
            if _web_server_process.poll() is not None:
                # Process ended, get error
                _, stderr = _web_server_process.communicate()
                return {
                    "success": False,
                    "message": f"Failed to start web GUI: {stderr.decode()}"
                }
    
            url = f"http://localhost:{port}"
            if open_browser:
                webbrowser.open(url)
    
            return {
                "success": True,
                "message": "Web GUI started successfully",
                "url": url,
                "pid": _web_server_process.pid
            }
    
        except Exception as e:
            return {
                "success": False,
                "message": f"Failed to start web GUI: {str(e)}"
            }
  • Input schema definition for the 'start_gui' tool, specifying optional parameters 'port' (integer) and 'open_browser' (boolean).
    Tool(
        name="start_gui",
        description="Start the web GUI for session management and open it in browser",
        inputSchema={
            "type": "object",
            "properties": {
                "port": {
                    "type": "integer",
                    "description": "Port to run the web server on (default: 5050)"
                },
                "open_browser": {
                    "type": "boolean",
                    "description": "Whether to open browser automatically (default: true)"
                }
            },
            "required": []
        }
    ),
  • Registration and dispatch logic within the MCP @mcp.call_tool() handler that matches tool name 'start_gui', parses arguments, and calls the start_web_gui implementation.
    elif name == "start_gui":
        port = arguments.get("port", 5050)
        open_browser = arguments.get("open_browser", True)
        result = start_web_gui(port, open_browser)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions starting a web GUI and opening a browser, but fails to describe critical behaviors like whether this is a long-running process, if it requires specific permissions, potential side effects (e.g., port conflicts), or error handling. This leaves significant gaps for a tool that likely initiates a server.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Start the web GUI') and includes the key outcome ('open it in browser'). There is no wasted wording, making it appropriately sized and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of starting a web server and the lack of annotations and output schema, the description is insufficient. It doesn't cover what happens after starting (e.g., server status, GUI features), potential errors, or dependencies, leaving the agent with incomplete context for safe and effective use.

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 input schema has 100% description coverage, fully documenting both parameters with their types and defaults. The description adds no additional meaning beyond what the schema provides, such as explaining why these parameters matter or their impact. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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 tool's purpose with a specific verb ('Start') and resource ('web GUI for session management'), and it specifies the action of opening it in a browser. However, it doesn't explicitly differentiate from sibling tools like 'stop_gui', which would be helpful for disambiguation.

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, such as 'stop_gui' for stopping the GUI or other session management tools. It lacks context about prerequisites, timing, or exclusions, leaving the agent to infer usage scenarios.

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/es6kr/claude-session-manager'

If you have feedback or need assistance with the MCP directory API, please join our Discord server