NEW YORK -- Pretend for a moment that you're Matt Klentak.

You watched the Phillies pull out a come-from-behind 7-2 victory Friday night over the New York Mets, a team that is actually colder than yours. Still, it was a feel-good win because, well, every win these days feels good to the Phillies, who also didn't roll into New York until 4 a.m. after a long, laborious game Thursday night in Atlanta.

It's less than a month before the trade deadline, and despite how poorly the Phillies have played over these last six weeks and how flawed the roster is in so many areas, they are firmly in the wild-card hunt, no small point for a franchise that hasn't made the playoffs since 2011 and an ownership that spent nearly half-a-billion dollars on players in the offseason.

So, you be the general manager. What do you do? Which needs do you address? How aggressive do you get?

"I have a lot of trust in Matt and our front office to go out and help us acquire pieces," manager Gabe Kapler said before the game, "if that's the most important action steps to take."

It will be up to the Phillies, then, to prove to Klentak that they’re worth taking action for. And wins like this go a long way toward that end.

Trailing, 2-1, in the seventh inning against reigning Cy Young Award winner Jacob deGrom, the Phillies tied the game on Cesar Hernandez’s 40-foot tapper down the third-base line that scored hard-charging Rhys Hoskins from third.

Then they scored five runs in the ninth inning against embattled Mets closer Edwin Diaz and Jeurys Familia, the best relievers in a beleaguered bullpen. J.T. Realmuto began the rally with a leadoff double and scored the go-ahead run on a single by Jay Bruce, who recorded his sixth game-winning RBI in his 26th game with the Phillies.

“Great team win,” center fielder Scott Kingery said. “To be able to get two [runs] off deGrom and do that in the ninth is awesome. That’s what you ask for, everyone to get on and just have great at-bats, after at-bat, and keep the line moving. That’s what we did.”

It marked the Phillies' sixth consecutive victory over the Mets, their longest winning streak against their rival at the opposite end of the Jersey Turnpike since a nine-game roll spanning 2007-08. Five of their last seven victories overall have come against the Mets.

But several of the Phillies' warts were on display early in the game.

Take, for instance, their fickle offense. Kingery hit a leadoff homer on deGrom's first pitch of the game, a 98-mph fastball, and the Phillies didn't get another hit until Realmuto's seventh-inning double on deGrom's 89th pitch.

Vince Velasquez, who is clinging to the fifth-starter spot almost by default, turned in five mostly solid innings. But he gave up a pair of costly two-strike hits to rookie sensation Pete Alonso, who tied the game with his 29th homer of the season in the fourth inning and gave the Mets a 2-1 lead by splitting the gap in right-center field for an RBI double in the fifth.

After Hoskins slid in under catcher Wilson Ramos' tag to tie the game in the seventh inning, the Phillies had the go-ahead run on third base with two outs and the pitcher's spot coming up against deGrom. Kapler's first option off the bench was .152-hitting backup catcher Andrew Knapp, who struck out to end the rally and keep the game tied.

But the Phillies got strong relief pitching from Jose Alvarez, Tommy Hunter, Adam Morgan and Hector Neris, and timely enough hits.

"Pretty big win for us," Kapler said. "Look, when you're facing Jacob deGrom, you know it's going to be a dog fight. He brought every bit of what he normally brings. Our guys just stood in there and battled.

"How we respond to struggles and adversity is really what defines this club. I continue to say that our club battles back. It's resilient. It continues to get back up and work hard."

And with the Washington Nationals losing, the Phillies moved back into second place after relinquishing it for one night, a situation that figures to be repeated often over the next couple of months.

So, the trade deadline is coming up fast, and you’re Matt Klentak.

What do you do?