Manager Bruce Bochy said "it was inevitable" that Cain would have surgery. Bochy said after Monday's 4-3 win over the New York Mets that Cain would have the operation and look forward to getting ready for spring training.
The 29-year-old Cain hasn't pitched since July 9. The three-time All-Star played catch at Citi Field on Friday to test out how he was feeling.
Cain was 2-7 with a 4.18 earned-run average in 15 starts.
Yankees' Tanaka makes progress
Masahiro Tanaka took a very small step toward returning to the New York Yankees' rotation, playing a pain-free game of catch.
Tanaka made 25 throws from 60 feet Monday, his first action since being sidelined in early July with a small tear of the ulnar collateral ligament in his right elbow.
The rookie sensation from Japan was 12-4 with a 2.51 ERA before landing on the disabled list. He is trying to avoid Tommy John surgery, which would sideline the 25-year-old All-Star for at least a year.
Michael Pineda, another sidelined Yankees starter, appears much closer to a return from a right shoulder muscle injury. The right-hander threw 58 pitches in 31/3 innings for triple-A Scranton/Wilkes-Barre on Sunday.
A day later, he was happy with how his shoulder felt.
Outfielder Nate McLouth has been placed on the 15-day disabled list by the Washington Nationals with a shoulder injury.
The 32-year-old McLouth has right shoulder inflammation. He's batting .179 in 79 games, including 33 starts, with one homer and seven runs batted in.
Washington filled the roster spot by recalling outfielder Steven Souza Jr. from triple-A Syracuse.
Souza leads the International League with a .354 batting average.
Teixeira scratched from Yankees lineup
Yankees first baseman Mark Teixeira was scratched from the lineup after feeling lightheaded before New York's game Monday night against the Detroit Tigers.
Chase Headley moved from third base to fill in for Teixeira at first on Monday night. Newcomer Martin Prado was shifted from right field to third base in his first start at Yankee Stadium since being acquired in a deadline deal with Arizona on Thursday.
Ichiro Suzuki took over in right field and batted ninth.
Cleveland designated hitter Nick Swisher was out of the Indians' lineup Monday because of a strained right wrist.
Swisher left Sunday's game against Texas after hurting himself. Cleveland hosted Cincinnati on Monday night.
The injury is another setback in a rocky season for Swisher. He was on the disabled list in June with a sore knee and is batting .212 with eight homers and 42 RBIs.
Swisher signed a four-year, $56 million contract with Cleveland after the 2012 season. He batted .246 with 22 homers and 63 RBIs last year.