Catalyzes the reversible interconversion of serine and glycine with a modified folate serving as the one-carbon carrier. Also exhibits a pteridine-independent aldolase activity toward beta-hydroxyamino acids, producing glycine and aldehydes, via a retro-aldol mechanism. Amino-acid biosynthesis; glycine biosynthesis; glycine from L-serine: step 1/1. Homodimer. Belongs to the SHMT family.