President Barack Obama deliverers the commencement address to the U.S. Military Academy at West Point's Class of 2014, in West Point, N.Y., Wednesday, May 28, 2014.

"Just because we have the best hammer does not mean that every problem is a nail." -President Obama on U.S. leadership in the world -The White House (@WhiteHouse) May 28, 2014

President Barack Obama declared on Wednesday that the US remains the world's most indispensable nation, even after a "long season of war," but argued for restraint before embarking on more military adventures.Obama's speech signaled a concerted effort by the White House to push back against critics who contend that the president's approach to global problems has been too cautious and has emboldened adversaries in Syria, Russia and China. It's a criticism that deeply frustrates the president and his advisers, who say Obama's efforts to keep the US out of more military conflicts are in line with the views of the American public.Standing before the newest class of officers graduating from the US Military Academy, Obama said, "I would betray my duty to you, and to the country we love, if I sent you into harm's way simply because I saw a problem somewhere in the world that needed fixing, or because I was worried about critics who think military intervention is the only way for America to avoid looking weak."In a tweet from the official White House account, Obama said, "Just because we have the best hammer does not mean that every problem is a nail."Even as the US emerges from the two wars that followed the Sept. 11, 2001, attacks, Obama said terrorism remains the most direct threat to American security. But he argued that as the threat has shifted from a centralized al-Qaida to an array of affiliates, the American response must change too.The president's speech came one day after he outlined plans to wind down America's lengthy war in Afghanistan by the end of 2016. The blueprint calls for keeping 9,800 troops in Afghanistan for training and counterterrorism even after combat missions end later this year, but then withdraw them within two years.The drawdown plan is central to Obama's long-standing pledge to bring to a close both the Afghan conflict and the Iraq war, which ended in late 2011. He was greeted by cheers from the graduating cadets when he noted that they had the distinction of being "the first class to graduate since 9/11 who may not be sent into combat in Iraq or Afghanistan."Even as he heralded the end of those two wars, Obama said the US would continue to use military force on its own "when our core interests demand it - when our people are threatened, when our livelihood is at stake, or when the security of our allies is in danger." He also continued to defend his use of drone strikes in places like Yemen and Somalia but called for increased transparency about the program that has long been shrouded in secrecy.

But a centerpiece of Obama's address was a defense of his preference for acting as part of an international coalition instead of pressing ahead alone. He challenged skeptics who see that approach as a sign of weakness and argued instead that it instead highlights America's ability to lead on the world stage."Throughout these negotiations, it has been our willingness to work through multilateral channels that kept the world on our side," he said.