Protocol keeps people in line.

Its definition is rooted in rules, structure and courtesy. In the context of international diplomacy, protocol is the etiquette that governs interactions between heads of state and their delegations. It creates guardrails that keep state dinners from devolving into food fights and prevent international summits from taking on the contours of a high school cafeteria.

Falling under the banner of soft power, protocol encompasses matters from the lighting in a meeting room and the seating at a dinner to the fashion choices of the participants. And when you’re working on behalf of the United States, if you manage to get all of those elements just right, it means you’ve created a setting in which all the parties feel respected but the United States wins the day — or at least has the advantage.

Capricia Penavic Marshall has spent a good portion of her professional life focused on these social rules. She served as social secretary in the Clinton White House and was chief of protocol in the Obama administration. “Protocol: The Power of Diplomacy and How to Make It Work for You” is the summation of her experience: a combination of an insider’s memoir, a woman’s road map to professional success and a Miss Manners-meets-Martha Stewart guide to home entertaining.

While it’s a near certainty that Marshall hosts a terrific dinner party in her home, her advice on how to do so is the least interesting thing she has to offer. And her suggestions on how to snag a meeting with elusive VIPs, which basically entail stalking them at their favorite restaurant, may be a true insight on the ways of the powerful and the power hungry, but it’s also a strong argument for keeping one’s daily schedule as unpredictable as possible.

The best bits of “Protocol” are when Marshall provides a behind-the-scenes view of the myriad small decisions that combine to give a meeting between heads of state a productive sense of intimacy and authenticity, and the ways in which a misstep can cause debilitating insult to those same leaders, many of whom seem to have egos as fragile as spun sugar.

The book begins with a representative anecdote from a gathering of the Association of Southeast Asian Nations that President Barack Obama hosted at the Waldorf-Astoria in 2010. Someone hung the Philippine flag upside down. The Philippine delegation had not seen it yet, but the media had gotten wind of it. “My heart stopped,” Marshall writes. “Not only was this a fundamental disrespect to their country — flag protocol is one of the top priorities a host country is expected to execute perfectly — but in this case the visual sent a very specific message: In the Philippines, an inverted flag signifies that a nation is in a state of war.”

Marshall corrected the offending flag. But the more salient point of her story is that she — and the administration — acknowledged the mistake and expressed regret. “I suspect that because we’d immediately accepted responsibility and acted swiftly to right the wrong,” Marshall writes, “we’d moved it off the table before it gained any traction.”

Responsibility, a very adult concept, runs like a thread through Marshall’s tales from inside banquet halls, meeting rooms and the Oval Office. The word echoes like a tolling bell at a time when very few government officials in this country want to be the person with whom the buck stops.

Marshall doesn’t dwell on the current president. Donald Trump is mentioned sparingly, and politics is the subtext of her narrative, not the focus. Marshall assiduously practices the diplomacy that she enabled over a lifetime.

Instead, a reader learns that Secretary of State Hillary Clinton was deeply attentive to the impact of ambiance and setting. First lady Michelle Obama was initially more attuned to the value of protocol than President Obama and sometimes intervened to make sure that Marshall’s concerns were heard.

Close followers of state dinners during the Obama years will recall that crashers Michaele and Tareq Salahi marred the 2009 event honoring India. The Secret Service took responsibility for that breach of . . . pretty much everything. But were there elements of protocol, the politeness of it all, that affected the uninvited couple’s ability to move so seamlessly through the White House? Marshall doesn’t autopsy the episode; she doesn’t even bring it up, and that’s a disappointment.

She does, however, recall a humbling incident during the 2010 Mexico state visit. As was standard practice, Marshall was standing on the marble steps just behind the first couple. As she and the Obamas moved to greet the arriving President Felipe Calderón and his wife, Margarita Zavala, Marshall knew that her family back in Ohio was watching on television with pride because of their shared Mexican heritage. Marshall was wearing a long pink Oscar de la Renta gown and high, strappy Manolo Blahnik sandals, and she was feeling elegant and full of Emily Post confidence.

“Suddenly, my heel caught in a divot and in a flash, everything changed. Luckily, as I started to fall forward I was able to jump slightly to the next step before dropping onto my bottom. As I landed, I swear I could hear all of Cleveland scream in horror,” Marshall writes. “I remember the president reaching for me to help (it was too late, alas) and then shouting to the press, ‘Don’t take that picture!’ ” The press did not comply.

Reading “Protocol” is a bit like watching one of Aaron Sorkin’s gauzy political dramas unfold. There are no existential horrors, only policy ones that get worked out through backroom deals, a perfectly planned meal and a couple of wordy soliloquies. Marshall documents the country’s recent past, when the amusement of the day was having to reassure British Prime Minister David Cameron that he was dressed appropriately to accompany Obama to a college basketball game; the biggest cause for alarm during an international visit was over the president’s last-minute request for a private room for a bilateral; and embarrassment on the world stage was defined as a poor gift selection for Queen Elizabeth II.

“Protocol” is about the rules that keep the social contract from fraying. It’s a how-to guide for navigating the global stage with respect and dignity. But so much has changed for the worse in our world. And protocol, with its traditions and kindnesses, may not be up to the formidable task of addressing what is to be done when the value of the contract itself has been dismissed.

Protocol

The Power of Diplomacy and How to Make It Work for You

By Capricia Penavic Marshall

Ecco. 424 pp. $28.99