The Mets have agreed to a deal with free-agent righty Neil Ramirez, per Ken Rosenthal of FOX Sports (via Twitter). Ramirez, who just hit the open market after rejecting an outright assignment, will receive a major league pact.

[Related: Updated New York Mets depth chart]

Ramirez, 27, opened the season with the Giants before being claimed off waivers by the Blue Jays. He was designated and outrighted before seeing any action with Toronto, though, and just went unclaimed the second time through the wire.

New York will need to place Ramirez on its active roster, as he’s out of minor league options and thus cannot be sent down without first clearing waivers. The club will evidently be banking on Ramirez’s peripherals turning around his results. He gave up 15 earned runs in 10 1/3 innings with San Francisco, but also managed an 18:4 K/BB ratio with a strong 12.6% swinging-strike rate while dealing with some clear evidence of bad luck (.500 BABIP; 33.0% strand rate). The right-hander once looked like a potential long-term piece in the Cubs’ bullpen after coming over from the Rangers organization as a PTBNL in the Matt Garza trade, but shoulder and triceps injuries have slowed his career.