logout
Terminate the active session by invalidating the session ID on the Taiga MCP Bridge, ensuring secure disconnection from the Taiga project management platform.
Instructions
Invalidates the current session_id.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes |
Implementation Reference
- src/server.py:1244-1258 (handler)The handler function for the 'logout' tool. It invalidates the session by removing the corresponding TaigaClientWrapper from the global active_sessions dictionary and returns a status message.@mcp.tool("logout", description="Invalidates the current session_id.") def logout(session_id: str) -> Dict[str, Any]: """Logs out the current session, invalidating the session_id.""" logger.info(f"Executing logout for session {session_id[:8]}...") # Remove from dict, return None if not found client_wrapper = active_sessions.pop(session_id, None) # Use consistent var name if client_wrapper: logger.info(f"Session {session_id[:8]} logged out successfully.") # No specific API logout call needed usually for token-based auth return {"status": "logged_out", "session_id": session_id} else: logger.warning( f"Attempted to log out non-existent session: {session_id}") return {"status": "session_not_found", "session_id": session_id}
- src/server.py:27-27 (helper)Global dictionary that stores active sessions mapping session_id to TaigaClientWrapper instances. Used by logout to invalidate sessions.active_sessions: Dict[str, TaigaClientWrapper] = {}
- src/server.py:1244-1244 (registration)The @mcp.tool decorator registers the logout function as an MCP tool.@mcp.tool("logout", description="Invalidates the current session_id.")