The Giants have acquired infielder/outfielder Breyvic Valera from the Orioles for cash considerations, per announcements from both teams. Valera’s addition puts the Giants’ 40-man roster at 39.

The Orioles designated the 26-year-old Valera for assignment Friday, though his stay in limbo didn’t last long. He’ll now reunite with Giants president of baseball operations Farhan Zaidi, who was the Dodgers’ general manager when they acquired Valera from the Cardinals last April. The Dodgers then dealt Valera to the Orioles last July in a package for superstar Manny Machado.

The switch-hitting Valera didn’t accrue much playing time with St. Louis, Los Angeles or Baltimore, as he totaled 86 plate appearances and batted .216/.286/.243 with no home runs. But Valera has acquitted himself well at the Triple-A level, where he has slashed .301/.368/.427 with 17 long balls in 1,110 PAs, and has garnered notable minor league playing time at second, short, third and in the outfield. Now Valera – who has a minor league option remaining – could vie for a utility role in San Francisco, which is low on infield/outfield depth in the bigs.