Local metric dimension for graphs with small clique numbers