Right-handed hurler Tim Lincecum has agreed to a two-year deal worth a reported $35 million with the San Francisco Giants.

The 2012 World Series-winning Giants said Tuesday the deal, which would keep the two-time Cy Young Award-winner in San Francisco through 2015, is pending a medical exam.

The San Francisco Chronicle reported the contract is worth $35 million, down from the two-year, $40.5 million deal Lincecum inked in January 2012 after his fourth straight All-Star Game appearance.

Lincecum, 29, has won two World Series titles with the Giants, but his production has decreased the past two seasons.

However, he did toss the first no-hitter of his career in 2013, striking out 13 against the San Diego Padres on July 13.