Gen. John Kelly was just joking, of course, when he handed President Trump a saber at a U.S. Coast Guard Academy ceremony in May and offered a suggestion: “Use that on the press, sir.”

But now, as Trump’s new chief of staff, Kelly needs a few weapons of his own — not so much to control wayward reporters but to bring discipline to a White House that often seems uncontrollable, especially when it comes to telling untruths.

So far, so good. He’s fired the potty-mouthed narcissist Anthony Scaramucci as communications director and showed no interest in retaining the hapless Sean Spicer. And he reportedly is forbidding West Wing staff from trotting into the Oval Office with news reports intended to infuriate the president and fire up his tweet machine.

In short, Kelly doesn’t mess around — as noted by “Late Night” host Seth Meyers after Trump predicted “a good time” with Kelly in charge.

President Trump with then-Homeland Security Secretary John Kelly in May at the Coast Guard Academy commencement ceremonies. (Kevin Lamarque/Reuters)

“I’m sorry, but John Kelly doesn’t look like a guy you bring in ‘to have a good time,’ ” Meyers said. “John Kelly looks like a guy who introduces himself by saying, ‘I’m not here to have a good time.’ ”

But can the general take on the hardest job of all — hacking through the thicket of lies that the Trump White House produces? You can have all the discipline and efficiency in the world, but it won’t do much good without a basis in reality that starts at the top.

The prospects for that are grim.

The Washington Post’s Fact Checker has relentlessly catalogued the president’s prevarications. A few months ago, the New York Times produced an astonishingly long list of the lies since he took office, and described the problem:

“There is simply no precedent for an American president to spend so much time telling untruths. Every president has shaded the truth or told occasional whoppers. No other president — of either party — has behaved as Trump is behaving. He is trying to create an atmosphere in which reality is irrelevant.”

As Kelly, under the president’s direction, looks for a communications director to replace Scaramucci, the truth problem looms large. How do you maintain credibility and, yes, integrity when the boss is wandering through the fields of fantasy?

Spicer, after all, got off to a terrible start when on the first day of his tenure as press secretary he vehemently defended the president’s easily disprovable falsehoods about the size of the inaugural crowds.

It’s unclear how Scaramucci would have handled that, but the first signs didn’t bode well as he dodged an early question about Trump’s false statements on voter fraud. “If the president says it, there’s usually some level of truth to that,” he offered.

The Mooch’s memo about his new job, published in draft form last week, gave lip service to working toward better media relationships. But he showed his hand when he suggested a broader role for one of the most outrageously truth-averse Trumpsters.

“Use Kellyanne Conway more,” Scaramucci urged. “She has consistently been the President’s most effective spokesperson, and she provides a direct link to the President’s historic electoral victory.”

Remember the “alternative facts” episode? That was vintage Conway, defending the president on inaugural crowd size, blissfully unencumbered by the weight of reality.

It never stops. Just days ago, Trump claimed to have received phone calls praising him from the head of the Boy Scouts and the president of Mexico.

His new press secretary, Sarah Huckabee Sanders, acknowledged these calls never happened, and condemned lying “from the podium or any other place,” but stopped short of calling the statements what they are: “I wouldn’t say it was a lie. That’s a pretty bold accusation.”

Kelly, though, is a force to be reckoned with. As The Post’s James Hohmann pointed out last week, the former homeland security secretary may have convinced the president he didn’t need to build a physical border wall with Mexico; called James B. Comey just after Trump fired him to express his dismay; and reached out to prominent Democrats in preparation for the fight over tax policy.

Kelly may well be Trump’s best hope for saving the White House from utter chaos. A grounding in reality — yes, truth — needs to be a part of that salvation.

For inspiration, Kelly could consult a Nixon-era John Lennon song from the year the future general turned 21: “Gimme Some Truth.” (“I’ve had enough of watching scenes from schizophrenic egocentric paranoiac prima donnas/All I want is the truth, just give me some truth.”)

More realistically, he could turn to the Marine Corps values that presumably guided his decorated military career. The bedrock, they state, is honor: “It is the quality that empowers Marines to exemplify the ultimate in ethical and moral behavior: to never lie, cheat, or steal; to abide by an uncompromising code of integrity. . . . ”

It’s hard to imagine how that admirable ethos and this mendacious White House can coexist for very long. If there’s a sword involved, Kelly may have to fall on it.

For more by Margaret Sullivan visit wapo.st/sullivan