As for the effect on North Korea, Mr. Blair said the dictatorship has stood down from confrontations when convinced that the United States was serious. “It’s probably good to throw back at them what they throw at us,” he said. “When they think we’re angry, they back off.”

To much of the foreign policy establishment in both parties, however, the approach is alarming. “When I was watching the president talk, I thought, ‘Oh, my god, why is he doing this?’” said Senator Dianne Feinstein, Democrat of California and the former chairwoman of the Senate Intelligence Committee. “Anybody who knows anything about this young Korean leader knows it’s going to promote an even more aggressive response.”

“I just wished he’d stop it, with the tweeting one day and the next day, it’s something else,” Mrs. Feinstein added. “Why isn’t the secretary of state the one making the statements? Why didn’t he at least make it at the White House and not some golf course, or wherever he was? He speaks for the whole country, not just for his feelings at the moment. It’s just dangerous.”

Mr. Trump’s statements have been as vague as they have been vivid, not clearly defining what his red line would be. What would prompt an American strike? When Mr. Trump made his fire-and-fury comment on Tuesday, he said it would come in reaction to a threat to the United States, not necessarily an attack. In subsequent comments, he has said he would react if North Korea launched a strike against American interests, like the Pacific territory of Guam, or United States allies in the region.

Similarly, what would he require as the goal of any negotiations? Would North Korea have to freeze its nuclear program or give it up altogether? Could he live with a deal that merely puts off the problem, like the Iran nuclear agreement brokered by his predecessor that he routinely excoriates? Mr. Trump said in recent days that he wanted to “denuke the world,” but many doubt North Korea would ever surrender its weapons now that it has developed them.

Some of Mr. Trump’s advisers, including Stephen K. Bannon, his chief strategist, have urged him to take a less interventionist stance, but Mr. Bannon has been kept out of most of the deliberations. Mr. Mattis, for his part, has advised Mr. Trump to project strength and resolve. But he has quietly lamented to lawmakers from both parties the absence of military options against North Korea that would not imperil the lives of millions of civilians in South Korea and Japan.