  The close neighbourhood of a supermassive black hole contains not only the
accreting gas and dust but also stellar-sized objects, such as late-type and
early-type stars and compact remnants that belong to the nuclear star cluster.
When passing through the accretion flow, these objects perturb it by the direct
action of stellar winds, as well as their magnetic and gravitational effects.
By performing General-Relativistic Magnetohydrodynamic (GRMHD) simulations, we
investigate how the passages of a star can influence the supermassive black
hole gaseous environment. We focus on the changes in the accretion rate and the
emergence of blobs of plasma in the funnel of an accretion torus. We compare
results from 2D and 3D numerical computations that have been started with
comparable initial conditions. We find that a quasi-stationary inflow can be
temporarily inhibited by a transiting star, and the plasmoids can be ejected
along the magnetic field lines near the rotation axis. We observe the
characteristic signatures of the perturbing motion in the power spectrum of the
accretion variability, which provides an avenue for a multi-messenger detection
of these transient events. Finally, we discuss the connection of our results to
multi-wavelength observations of galactic nuclei, with the emphasis on ten
promising sources (Sgr~A*, OJ 287, J0849$+$5108, RE J1034$+$396, 1ES 1927+65,
ESO 253--G003, GSN 069, RX J1301.9$+$2747, eRO-QPE1, eRO-QPE2).
