UNITED NATIONS — The polished and protocol-obsessed diplomats of the United Nations hardly knew what to expect when President Trump arrived at their citadel along the East River on Monday for the first time since taking office. But this was not it.

Instead of a tiger, they got a tabby. Mr. Trump, the apostle of America First who has heaped scorn on global institutions, ripped up international agreements and quarreled even with allies, offered a subdued and largely friendly performance on the opening day of his inaugural visit to the United Nations.

He praised Secretary General António Guterres for tackling mismanagement and bureaucracy. He complimented the United Nations — and himself — by boasting that he made the right decision to build a high-rise tower opposite its headquarters. Even his Twitter feed hewed closely to the sort of scripted lines his predecessors might have used: “great week ahead,” “looking forward to meeting,” “productive first day.” He came, he saw, he gripped and grinned.

“We pledge to be partners in your work,” Mr. Trump told a room full of world leaders as he embraced an effort to overhaul the organization. “And I am confident that if we work together and champion truly bold reforms, the United Nations will emerge as a stronger, more effective, more just and greater force for peace and harmony in the world.”