I explained it poorly. These people wouldn't have to be undercover, just a well trained security guard type.
Of course prevention is preferable but we have to deal in the reality of life instead of making sound bytes. Guns are here to stay and we aren't suddenly going to gain full and complete understanding of mental illnesses, how to identify those people and how to treat them. Plus, some people are just evil scumbags.