Chemical biology tools are critical to provide new insights into glycobiology. A protein O-glycosyltransferase, Legionella translocated protein M (LtpM), is reported as a glycoengineering tool that requires strict and short consensus sequons to probe β-O-glucosylation and O-GlcNAcylation.