In this paper, we construct a modified gradient sampling method for solving a type of nonsmooth semi-infinite optimization problem. The algorithm is grounded in the modified ideal direction, a subgradient computed in the convex hull of some sampling points. In addition, we discretize the semi-infinite optimization problem as a finite constraint problem based on the modified adaptive discretization method, ensure the convergence of the algorithm with respect to the discretization problem, and diminish the number of evaluations of the constraint function. Moreover, we establish the theoretical convergence of the algorithm under suitable assumptions. Finally, we establish numerical results by applying algorithms and demonstrating that the new algorithm has advantages over the others.