Catalyzes the last irreversible step in the biosynthesis of L-serine from carbohydrates, the dephosphorylation of O-phospho-L-serine to L-serine (PubMed:12213811, PubMed:15291819, PubMed:9222972, PubMed:14673469, PubMed:25080166). L-serine can then be used in protein synthesis, to produce other amino acids, in nucleotide metabolism or in glutathione synthesis, or can be racemized to D-serine, a neuromodulator (PubMed:14673469). May also act on O-phospho-D-serine (Probable). H2O + O-phospho-L-serine = L-serine + phosphate H2O + O-phospho-D-serine = D-serine + phosphate Binds 1 Mg(2+) ion per subunit. Inhibited by calcium ions. Amino-acid biosynthesis; L-serine biosynthesis; L-serine from 3-phospho-D-glycerate: step 3/3. Homodimer. The disease is caused by variants affecting the gene represented in this entry. Belongs to the HAD-like hydrolase superfamily. SerB family.