President Reagan, capitalizing on his decision to sign legislation reinstating budget deficit targets, called on West Germany and Japan yesterday to demonstrate "the same political gumption" by speeding up their economies to benefit global commerce.

In an address to the 42nd annual joint meeting of the World Bank and the International Monetary Fund here, Reagan said that his "tough decision" on the Gramm-Rudman-Hollings legislation "should be seen as a signal that America is not backing down from its responsibilities.

"But having made this decision, I call on the surplus countries to do the same -- to find the political gumption to stimulate their economies without reigniting the fires of inflation."

Reagan thus endorsed a similar call by the IMF and World Bank for expansionary policies in Germany and Japan -- a call that has so far been rejected by those nations as either impossible or counterproductive.

But Reagan argued that "as U.S. budget and trade deficits decline, other countries must pick up the slack, particularly on imports from developing countries."

He cited as a model for the rest of the world the formerly underdeveloped nations around the Pacific rim that have become "a major force in the world economy.

"They have done so using economic concepts similar to those that helped reinvigorate America's economy these last five years," Reagan said.

Reagan's speech, revolving around the benefits of market-oriented free societies and of privatization, was well received by a packed audience in the ballroom of the Sheraton Washington Hotel. His main themes -- the need to oppose protectionism, do better on solving Third World debt problems and provide more money for the World Bank -- struck responsive chords.

IMF Managing Director Michel Camdessus pledged that his agency would adapt to new circumstances and play a larger role in helping to solve the debt crisis.

Camdessus suggested he would work hard to erode the image of the IMF as an agency interested in hard-nosed austerity, with no compassion for the social and human problems associated with poverty in the Third World.

World Bank President Barber B. Conable Jr. also pledged that the bank would step up its efforts to cope with the debt. Conable's task has been eased by the U.S. decision last week to back an increase in the bank's capital to enable it to boost its annual lending from the current $17 billion to around $20 billion within two or three years.

Reagan said that government has a responsibility to help shape a solution to the problem of the huge Third World debt, which is now estimated at about $1 trillion.

"A cooperative solution to the debt problem is the only real answer," he told the delegates assembled from 151 countries.

"It involves a partnership among developing countries, commercial banks and international financial institutions.

"The huge debt burden carried in the Third World is not just their problem; it is our problem. And today let us pledge: we will solve it together."

Warning that "there are no easy answers or quick fixes," Reagan seemed to rule out the more radical solutions to the debt problem, such as those offered by Sen. Bill Bradley (D-N.J.), who has called for debt relief and a measure of outright forgiveness.

Reagan said that the United States "will continue working with all those who are putting forth an honest effort to deal with the debt dilemma."

Treasury Secretary James A. Baker III, who had a key role in shaping Reagan's speech, has also ruled out for now the establishment of a new agency at the World Bank or elsewhere that would buy up debt at a discount and share the benefits with the borrowing countries.

Instead, Reagan stressed the commitment to boost loans through the IMF and World Bank.

Baker is expected to elaborate on these ideas in his speech to the annual meeting today.

The president gave considerable attention to the trade deficit and to the defense of his free trade approach against the "self-destructive protectionism" that he said is advocated by some in Congress.

"I pledge to you," he said, "that any protectionist legislation reaching my desk is going to be returned to the Congress with veto on the cover."

Reagan said that it is true that the trade deficit -- expected to be about $160 billion this year -- must come down, and that there are signs that this process is happening.

He denied the charge made by proponents of restrictive legislation that, because of the trade deficit, jobs are going overseas and the United States is being deindustrialized.

Reagan pointed to rising employment here in the face of a rising deficit, while unemployment has increased in Japan and West Germany. "And a long-term analysis shows us holding our own in manufacturing jobs," he said.

The president also plugged the need for success in the Uruguay Round of global trade negotiations, and said that the General Agreement on Tariffs and Trade (GATT), the international authority governing trade matters, must cover newer areas of international activity, such as technology and services.