BOSTON — Melky Cabrera, a veteran outfielder known for his switch-hitting prowess at the plate and on-field displays of affection, is returning to the Royals after being the center piece of a three-player deal Sunday afternoon.

On the eve of the non-waiver trade deadline, Kansas City sent minor-league pitchers A.J. Puckett and Andre David to the Chicago White Sox in exchange for Cabrera, a free agent at the end of the 2017 season.

The trade reinforced the Royals’ desire to supplement a championship core with roster upgrades as a collection of players — including Eric Hosmer, Mike Moustakas and Lorenzo Cain — near free agency in the winter. Early last week, the club acquired starting pitcher Trevor Cahill and relievers Brandon Maurer and Ryan Buchter in an attempt to strengthen their pitching staff. Six days later, they turned their attention to a veteran outfielder who can bolster their lineup while playing a corner outfield spot or filling in at designated hitter.

“We are trying to give this team everything they need to win at this time,” said assistant general manager Scott Sharp, who was traveling with the team here in Boston.

The Royals took on an additional $2.5 million in salary by executing the deal. The White Sox defrayed some of those costs by covering more than half of Cabrera’s remaining salary. The 32-year-old outfielder is making $15 million in 2017, the last season of a three-year deal.

As the trade was announced on Sunday afternoon, Royals general manager Dayton Moore was in Cooperstown, N.Y., watching his former boss in Atlanta, John Schuerholz, be inducted into the Baseball Hall of Fame. Moore was not immediately available for comment. So the specifics on how the Royals might choose to utilize Cabrera during the season’s stretch run remained unclear.

Still, it appears likely the Royals will not view Cabrera as a one-for-one replacement for left fielder Alex Gordon, right fielder Jorge Bonifacio or designated hitter Brandon Moss, but rather an everyday player who could siphon playing time from all three.

Cabrera, who spent the 2011 season in Kansas City, projects as a certain offensive upgrade over Gordon, who entered Sunday batting .201 with a .294 on-base percentage and five homers in 92 games.

He could also be a slight defensive upgrade over Bonifacio, whose defensive inconsistencies have been exposed over extending playing time.

In his 13th major-league season, Cabrera remains a versatile hitter who has been a slightly above average offensive performer in 2017. In 98 games for the White Sox, he is batting .295 with a .336 on-base percentage and 13 homers in 98 games. His adjusted OPS-plus is 108, or eight percent above league average. According to advanced metrics, he has been a slightly below average fielder in left field.

Gordon, meanwhile, has remained one of the best defensive left fielders in the American League as his offensive skills have eroded. Bonifacio, a 24-year-old rookie, entered Sunday batting .263 with a .332 on-base percentage and 14 homers in 80 games. His adjusted OPS-plus is 105.

Cabrera, of course, could also take starts away from Moss, a designated hitter who slumped horribly for more than three months before finding a groove in the month of July. Moss entered Sunday batting .271 with a .375 on-base percentage and .854 OPS in 48 at-bats after the All-Star break. He hit just .193 with 10 homers during the first half of the season.

To acquire the services of Cabrera, the Royals parted ways with Puckett, their second-round pick in 2016, and Davis, a 6-foot-6 left-handed pitcher with a big arm and potential upside.

Puckett, 22, is 9-7 with a 3.90 ERA in 20 starts at Class A Wilmington. He has struck out 98 hitters while issuing 46 walks. Davis, 23, was an eighth-round pick in 2015 who posted a 4.83 ERA in 18 starts at Class (low) A Lexington this season.

Finally, the deal reunites Cabrera with a collection of former teammates from his first stop in Kansas City. Signed as a free agent in 2010 after being released from the Atlanta Braves, Cabrera batted .305 with 18 homers and 201 hits in his only season in Kansas City.

He was traded to San Francisco for starting pitcher Jonathan Sanchez in the offseason before the 2012 season, a one-sided deal that was salvaged when the Royals flipped Sanchez to Colorado for starter Jeremy Guthrie.

Cabrera returned to Kansas City for the 2012 All-Star Game at Kauffman Stadium and won MVP honors before being hit with a 50-game suspension for a positive test of testosterone in August of that year.

He signed as a free agent with the Blue Jays before the 2013 season and spent two seasons in Toronto before heading to Chicago in 2015.