start_session
Initiates a Linux crash dump analysis session by loading vmcore and vmlinux files to enable system debugging and troubleshooting.
Instructions
Starts analysis session. Requires vmcore and vmlinux paths. Returns session ID.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vmcore_path | Yes | ||
| vmlinux_path | Yes | ||
| ssh_host | No | ||
| ssh_user | No |
Implementation Reference
- src/crash_mcp/server.py:65-89 (handler)The handler function for the 'start_session' MCP tool. It is registered via the @mcp.tool() decorator. Validates inputs, creates a UnifiedSession instance, starts the session, stores it globally, and returns the session ID or an error message.@mcp.tool() def start_session(vmcore_path: str, vmlinux_path: str, ssh_host: Optional[str] = None, ssh_user: Optional[str] = None) -> str: """Starts analysis session. Requires vmcore and vmlinux paths. Returns session ID.""" global last_session_id # Validation if not ssh_host and not os.path.exists(vmcore_path): return f"Error: Dump file not found locally at {vmcore_path} and no remote host specified." session_id = str(uuid.uuid4()) logger.info(f"Starting Session {session_id} for {vmcore_path} (Remote: {ssh_host})") try: session = UnifiedSession(vmcore_path, vmlinux_path, remote_host=ssh_host, remote_user=ssh_user) session.start() sessions[session_id] = session last_session_id = session_id return f"Session started successfully. ID: {session_id}\n(Wraps both 'crash' and 'drgn' engines. Commands are automatically routed.)" except Exception as e: logger.error(f"Failed to start session: {e}") return f"Failed to start session: {str(e)}"