The 36-year-old Dotel is 2-2 with a 4.28 ERA and 21 saves. He is owed about $1.3 million on a salary of $3.25 million. He had a club option for 2011 for $4.5 million or a $250,000 buyout. Because he was traded, the option becomes a mutual option.
The move is similar to one the Dodgers made a year ago when they got Baltimore closer George Sherrill to set up for closer Jonathan Broxton.
"It came about in the last 40 minutes," general manager Ned Colletti said of the Dotel trade. "We've been trying to get one more bullpen piece. He's not taking Broxton's spot. He'll fit somewhere between the sixth and eighth inning, most likely."
Colletti said with the "intriguing" emergence of rookie Kenley Jansen, he is hopeful that Ronald Belisario will return from the restricted list in as soon as two weeks to provide further bullpen depth.
"With five guys throwing in the low to high 90s with experience saving games, it fortifies a group that comes under a lot of duress as the season goes on," Colletti said.
Dotel learned of the trade watching MLB Network in the Pirates clubhouse.
"It's really, really nice," he said of the move. "My last two months, I'm going to be on a contending team. I'm going to have a chance to go to the playoffs. Being in a pennant race is something I always like. I think where I'm going, that's a pretty good team to be [with]."
Dotel said he knows he won't be the go-to guy in the ninth inning on a team with Broxton.
"I understand the guy closing there, he's really, really good," he said with a laugh. "He's got great stuff. Hey, you've got to be honest -- he's better than me. He's got to be the guy. This guy is way better than me."
The 25-year-old McDonald is 0-1 with an 8.22 ERA since being recalled July 19 after spending most of the season at Triple-A Albuquerque, where he was 6-1 with a 4.41 ERA.
The 21-year-old Lambo, once considered one of the organization's best position prospects, served a 50-game suspension this year for violating baseball's drug policy. He was hitting .271 with four homers and 25 RBIs in 47 games at Double-A Chattanooga.