Former President Bill Clinton and thriller writer James Patterson have teamed up to write a novel, which for pure marketing genius would be like Ruth Bader Ginsburg and Katy Perry releasing a duet. Terms of the Clinton-Patterson deal haven’t been revealed, but it’s no accident that in their acknowledgments, the first person the authors thank is Washington super-agent Robert Barnett cha-ching!

This isn’t the first work of fiction by a U.S. president: Jimmy Carter published a novel about the Revolutionary War, “The Hornet’s Nest,” in 2003, and Donald Trump is a master of fantasy. But “The President Is Missing” is nonetheless extraordinary. As the publishers gush, it’s the first novel “informed by insider details that only a president can know.”

The CIA can relax. “The President Is Missing” reveals as many secrets about the U.S. government as “The Pink Panther” reveals about the French government. And yet it provides plenty of insight into the former president’s ego.

The novel opens with the commander in chief, President Jonathan Duncan, preparing to appear before the House Select Committee. His staff has advised him against testifying. “My opponents really hate my guts,” Duncan thinks, but “here I am”: just one honest man “with rugged good looks and a sharp sense of humor.” Facing a panel of political opportunists intent on impeaching him, Duncan knows he sounds “like a lawyer,” but darn it, he’s trying to save the United States! Although Congress insists he explain what he’s been up to, he can’t reveal the details of his negotiations with a terrorist set on destroying the country.

As a revision of Clinton’s life and scandal, this is dazzling. The transfiguration of William Jefferson Clinton into Jonathan Lincoln Duncan should be studied in psych departments. Both lost their fathers early and rose from hardscrabble circumstances to become governors.

But then we come to the differences: Rather than avoiding military service, President Duncan is a war hero. Rather than being pleasured in the Oval Office by an intern, Duncan was tortured in Iraq. And rather than being the subject of rumors about extramarital affairs, Duncan was wholly devoted to his late wife.

Even incidental details provide weird echoes of the Clinton era: Duncan’s closest adviser is a woman publicly branded by a crude reference to oral sex.

This is, at least partially, a James Patterson book, and soon we’re crashing through his famous two-page chapters. The whole novel takes place in just a few days as a terrorist plots to activate a computer virus devised by an Abkhazian separatist, whose virus has infected every electronic device in America.

In a matter of hours, the country’s financial, legal and medical records will be erased; the transportation and electrical grids will crash. Hungry and Twitterless, America will be plunged into the Dark Ages.

Unfortunately, the title, “The President Is Missing,” depends upon what the meaning of the word “is” is. After all, Duncan narrates most of this story himself, so we always know his whereabouts. And it’s easy to tell which author is holding the reins. Sometimes, the pages spark to DEFCON 1 with spectacular shootouts, Viper helicopters and a pregnant assassin code-named Bach. I’m guessing that’s the handiwork of Patterson.

But for much of the novel, Patterson seems to have deferred to the First Writer. That’s a problem. When we pick up a thriller this silly, we want underwear models shooting missiles from hang gliders; Clinton gives us Cabinet members questioning each other over Skype. President Duncan spends an awful lot of time reminding us that “a safe and stable United States means a safe and stable Israel.” Rather than insider details, the novel is full of tepid moralizing.

The larger problem, though, is how cramped the novel’s scope remains. There’s no thrum of national panic, no sense of the world outside. The plot is stuck in a room with nerds trying to crack a computer code, and is as exciting as watching your parents trying to remember their Facebook password.

It’s enough to make a reader nostalgic for the Dark Ages.