This paper, important spectral data have been derived for the Sturm-Liouville problem with discrete boundary conditions by using the generalized \(\mathcal {M}-\) derivative. Spectral data proposed as representation of solution for the Sturm-Liouville problem are subjected to both initial and boundary conditions, the asymptotic formulas of the eigenvalues and eigenfunctions are realized the generalized \(\mathcal {M}-\) derivative. The primary advantage of this strong generalized \(\mathcal {M}-\) derivative is that it includes truncated \(\mathcal {M}-\) series, allowing us to better deal with the behavior of the topic and thanks to the extra parameter in the definition, treat it qua a generalized adaptation of another widespread local derivatives in the literature. The results obtained through the \(\mathcal {M}-\) series defined within the generalized \(\mathcal {M}-\) derivative used in this paper are discussed from a broader perspective. The purpose of this article is to investigate the construction of the Sturm–Liouville problem with the generalized \(\mathcal {M}-\) derivative by using MATLAB in visual analyses.