Catalyzes the synthesis of D-serine from L-serine. Has dehydratase activity towards both L-serine and D-serine. L-serine = D-serine L-serine = NH4(+) + pyruvate D-serine = NH4(+) + pyruvate Belongs to the serine/threonine dehydratase family.