The American critic Malcolm Cowley summed up the German writer Thomas Mann’s fiction as “intricate formal structure” taken to its limit. Mann himself, who won the Nobel Prize in literature in 1929, called his craftsmanship “thoroughgoing.” He packed so much physical detail and psychological acuity into his novels that some readers shy away from such strapping productions as “Buddenbrooks,” “The Magic Mountain” and “Doctor Faustus,” let alone the four-volume “Joseph and His Brothers.”

Against this background, the Irish novelist Colm Tóibín has managed to write an incisive and witty novel that shows what good company the Nobelist and his family might have been.

Tóibín did this sort of thing once before in his novel “The Master”: shadowing a great writer — Henry James, in that case — as he works and plays. What James and Mann have in common besides the demands they make on readers is a fraught relationship with their homosexuality. James was afraid to give his inclinations free rein — or, indeed, any rein at all. Tóibín’s Mann is less repressed.

As a schoolboy, Tom experiments with male classmates; as an adult he gazes at handsome men who cross his path. Mind you, this is not covert peeping from behind a pillar. Mann ogles so openly that when he is still single, a fellow writer brings up the subject in a cafe. “Everyone at this table knows that marriage is not for you. Anyone who follows your eyes can see where they land.” Nonetheless, Mann marries the attractive and intelligent Katia Pringsheim, with whom he will have six children. He takes a risk with his novella “Death of Venice” — the story of an aging composer whose infatuation with a beautiful boy has fatal consequences — but by the time of its publication in 1912, Mann’s stature is such that few readers notice how self-referential the tale is.

One of the Mann daughters eventually asks her mother why she married such a man. “My father was a philanderer,” Katia replies. “He could not stop himself. He wanted any woman he saw. I have not had that problem with your father.”

The Mann children regard their father with both awe and resentment. His nickname comes courtesy of his first son, Klaus, whose nightmares Thomas alleviates by claiming to be a “famous magician,” much feared by ghosts. (Oddly, Tóibín does not mention Mann’s chilling story “Mario and the Magician” in this regard.) Klaus and his siblings are quite bright, and some of them will go on to publish books of their own. Tóibín seems determined to give the children their due, something their father never managed to do. Indeed, while Mann himself remains rather opaque, Klaus, his sister Erika and their four siblings come vividly alive.

Late in the novel, after Klaus commits suicide, the youngest son, Michael, writes his father a letter to excoriate him for not attending the funeral: “You are a great man. Your humanity is widely appreciated and applauded. . . . It hardly bothers you, most likely, that these feelings of adulation are not shared by any of your children. As I walked away from my brother’s grave, I wished you to know how deeply sad I felt for him.”

Wherever the Manns live — in Munich, Princeton, Los Angeles or Switzerland — they receive glittering guests, among them Alma Mahler, widow of the composer Gustav, who says whatever she pleases. Here she is at the Mann dinner table, reflecting on her famous husband: “I think people who say they are sick have a duty to actually be sick. If Gustav had a pimple on his nose, he was sure it was the end. And I suppose he had the courage of his convictions since he died young.”

Another riveting presence is Agnes Meyer, wife of Eugene Meyer, who published The Washington Post during the 1930s and ’40s. When Adolf Hitler comes to power, the Manns know they must emigrate, not least because Katia is Jewish; they accept the bossy Agnes’s help in getting settled in America but make fun of her behind her back. The Roosevelts pitch in while entertaining the Manns at the White House:

“In person, [Agnes] is fearsome,” Franklin says. “But down a telephone line, she is an opera singer.”

“We had to sit through an opera recently,” Eleanor explains, “so the president is still haunted by the terror of it all.”

Novelists who write about historical events and real people often note their departures from strict fact, if any. Tóibín has not followed that practice in “The Magician,” but this reviewer can attest that Tóibín’s take on Mann jibes with that of Anthony Heilbut in his astute “Thomas Mann: Eros and Literature,” which leads off Tóibín’s list of the secondary sources he found “helpful.”

At 500-plus pages, “The Magician” is Mann-sized, but it canters along not only on the strength of Tóibín’s graceful prose, but also because the reader can hardly wait for the next bon mot from a family member or guest. Christopher Isherwood, Albert Einstein, Bertolt Brecht and other luminaires have cameos, and in their absence one or another Mann is sure to pick up the slack.

At the end, Tóibín reminds us that his protagonist lightened up in his last novel, the racy “Confessions of Felix Krull,” published shortly before his death in 1955. Preparing to write it, Mann muses that Felix (Latin for “happy”) should embody his creator’s final thoughts on humans: “that [they] could not ever be trusted, that they could reverse their own story as the wind changed, that their lives were a continuous, enervating and amusing effort to appear plausible. And in that lay, he felt, the pure genius of humanity, and all the pathos.” No one fits that description better than Thomas Mann himself.

Dennis Drabelle is a former contributing editor of Book World.

The Magician

By Colm Tóibín

Scribner. 512 pp. $28