Magnesium-dependent glutamate N-prenyltransferase: part of the gene cluster that mediates the biosynthesis of domoic acid (DA) and derivatives, natural products with neurochemical activity acting as ionotropic glutamate receptor (iGluR) agonists, thus being neurotoxins causing amnesic shellfish poisoning (ASP) (PubMed:30262498). Catalyzes the conversion of L-glutamic acid (L-Glu) to N-geranyl-L-glutamic acid (NGG) in the presence of geranyl diphosphate (GPP) (PubMed:30262498, PubMed:32457155). Also able to catalyze the formation of farnesyl-L-glutamate from farnesyl diphosphate (FPP) (PubMed:32457155). Cannot use dimethylallyl diphosphate (DMAPP) as substrate (PubMed:32457155). (2E)-geranyl diphosphate + L-glutamate = diphosphate + N-geranyl-L-glutamate Can also use Mn(2+) ions as cofactors with a lower efficiency. kcat is 4.3 min(-1) with geranyl diphosphate as substrate (PubMed:32457155). kcat is 4.8 min(-1) with L-glutamic acid as substrate (PubMed:32457155). Secondary metabolite biosynthesis. Up-regulated under phosphate limitation and by increasing partial pressure of CO(2). Belongs to the terpene synthase family.