SAN FRANCISCO — Less than a month away from MLB’s Aug. 1 trade deadline, front office phone lines are heating up.

The Giants have a few paths they can take.

Last year, president Farhan Zaidi offloaded a handful of veteran reserves — Darin Ruf, Curt Casali, Matthew Boyd — but didn’t go full sell mode, opting to hold on to Carlos Rodón and Joc Pederson. In 2021, you’ll remember, Zaidi made a surprise splash by acquiring Kris Bryant for a pair of prospects.

Are the Giants buyers or sellers?

Although they have cooled off since their 10-game win streak, that run placed them firmly among the playoff contenders in the National League.

Entering Wednesday, the Giants sat four games back of the first-place Diamondbacks in the NL West, in a virtual tie for the third and final wild-card spot. (Philadelphia leads by percentage points.)

It’s more difficult to find the sellers in the current environment, with 40% of the league — 12 teams — making the playoffs each year. There are currently only eight teams more than six games back of a wild-card spot: the A’s, Royals, Nationals, Rockies, White Sox, Cardinals, Tigers and Mets.

What is their payroll situation?

The Giants took an estimated $187.9 million payroll into Opening Day, the 10th-highest mark in the majors, according to Baseball Prospectus. That would appear to give them ample room to maneuver without hitting the first luxury tax threshold of $233 million. But the pertinent number is $218.6 million, which takes into account all the players on their 40-man roster and the other miscellaneous money that counts toward the tax, meaning the Giants have about $15 million to work with.

Why care about the luxury tax? Penalties start at 20% for every dollar spent over the limit but increase up to 50% by the third year in a row a team exceeds the threshold. It’s of particular interest this season, with Shohei Ohtani set to hit free agency this winter and his record-setting contract almost certain to put any team in the penalty.

What is the biggest area of need?

With Thairo Estrada out for the next month or more and Casey Schmitt still slumping, perhaps the Giants’ calculations change. But one area of need has emerged over the past month. Take a look at where San Francisco ranks leaguewide since the start of June in the following categories:

  • Batter wins above replacement: 4.2, t-9th
  • Starting pitcher wins above replacement: 1.4, 23rd
  • Relief pitcher wins above replacement: 2.3, 1st

The Giants boasted so many capable starters in spring training there were questions about how they would deploy them. A week away from the All-Star break, the only two arms that have proven they can be counted on every fifth day are Logan Webb and Alex Cobb.

Who could be available?

RHP Marcus Stroman, Cubs: Known acquaintance of Logan Webb would give the Giants a powerful 1-2 punch of sinker ballers at the top of their rotation. Stroman trails only Webb in ground-ball rate, while his 2.76 ERA ranks ninth in the majors, but that will also likely make him the most sought-after commodity on the trade market. St. Louis is further back in the NL Central and could part with Jordan Montgomery, another frontline starter set to hit free agency after this season.

LHP Blake Snell, Padres: The Giants and Padres have worked only two trades since 2003 and haven’t made a major deal since the swap of Kevin Mitchell in 1987, but might Snell be worth lifting the embargo? He leads the majors in walks but is coming off NL Pitcher of the Month honors for June, posting a 0.87 ERA over five starts. Worth wondering how the Padres view themselves: They sit six games out of playoff position but own a better run differential than the Giants. The Mets, also big-money underperformers, don’t appear to be waving the white flag yet, adding a bullpen arm this week, but Max Scherzer and Justin Verlander would draw immense interest.

RHP Lucas Giolito, White Sox: If not Giolito, a California native with a 3.50 ERA and the lowest walk rate of his career, then perhaps Zaidi and Rick Hahn can link up elsewhere. Tim Anderson could be an external answer to their middle-infield depth with Estrada looking at a lengthy absence, while Dylan Cease would come with a much heftier price tag as the reigning Cy Young runner-up under team control through 2026.

LHP Eduardo Rodriguez, Tigers: Zaidi’s former top lieutenant, Scott Harris, is now in charge of baseball operations in Detroit and possesses one of the top arms that could be available, though unlike the aforementioned trio, Rodriguez is signed through 2027 at an average annual salary of $16.3 million.

What chips do the Giants have to bargain with?

The most practical answer to this question is to take a look at the 40-man roster. Who is taking up one of the valuable spots and not contributing at the major-league level this year but still holds potential future value as a prospect? There are three names that fit the profile for the Giants:

  • RHP José Cruz
  • RHP Randy Rodríguez
  • IF Marco Luciano

Luciano is one of four Giants prospects ranked in the top 100 around baseball by MLB.com, and it would likely require parting with at least one to pry away a substantial upgrade. Whether the Giants would part with someone such as Kyle Harrison for a rental remains to be seen. They could also sell high on their most recent draft class, which is loaded with strong-performing pitchers, starting with second-rounder Carson Whisenhunt.

If the Giants go another route, they have a number of players on expiring contracts that could be flipped without dramatically altering next year’s roster:

  • LHP Alex Wood
  • DH/OF Joc Pederson
  • LHP Scott Alexander
  • RHP Jakob Junis