stop_session
Terminates an active crash analysis session to free system resources and end debugging processes.
Instructions
Terminates an active session.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No |
Implementation Reference
- src/crash_mcp/server.py:136-156 (handler)The `stop_session` tool handler, registered via `@mcp.tool()` decorator. Terminates the specified session (or last active one) by calling `session.stop()`, removing it from the sessions dictionary, and updating the last_session_id if necessary.@mcp.tool() def stop_session(session_id: Optional[str] = None) -> str: """Terminates an active session.""" global last_session_id target_id = session_id or last_session_id if not target_id: return "Error: No session specified and no active default session." if target_id not in sessions: return f"Error: Session ID {target_id} not found." session = sessions[target_id] session.stop() del sessions[target_id] if last_session_id == target_id: last_session_id = None return f"Session {target_id} closed."