In situ observations of solar energetic particles (SEPs) often show rapid variations of their intensity profile, affecting all energies simultaneously, without time dispersion. A previously proposed interpretation suggests that these modulations are directly related to the presence of magnetic structures with a different magnetic topology. However, no compelling evidence of local changes in magnetic field or in plasma parameters during SEP modulations has been reported. In this paper, we performed a detailed analysis of SEP events and we found several signatures in the local magnetic field and/or plasma parameters associated with SEP modulations. The study of magnetic helicity allowed us to identify magnetic boundaries, associated with variations of plasma parameters, which are thought to represent the borders between adjacent magnetic flux tubes. It is found that SEP dispersionless modulations are generally associated with such magnetic boundaries. Consequently, we support the idea that SEP modulations are observed when the spacecraft passes through magnetic flux tubes, filled or devoid of SEPs, which are alternatively connected and not connected with the flare site. In other cases, we found SEP dropouts associated with large-scale magnetic holes. A possible generation mechanism suggests that these holes are formed in the high solar corona as a consequence of magnetic reconnection. This reconnection process modifies the magnetic field topology, and therefore, these holes can be magnetically isolated from the surrounding plasma and could also explain their association with SEP dropouts.