Washington — Because of drought and other problems, Mexico is asking the United States to speed the provision of half a billion dollars in agricultural commodity credits. Two weeks ago, Mexico sent a signal to the world that it was dealing more effectively with its huge foreign-debt problem than many realized. It delayed drawing on a $1.1 billion second installment of a loan worked out with the International Monetary Fund (IMF).
Mexico's latest signal seems to say: ''We're doing a lot better than many realized, but we still have a long, long way to go.''
John A. Gavin, the American ambassador to Mexico, is in Washington, helping, among other things, to arrange for a speedup in the already promised half-billion dollars in credits. In an interview, Mr. Gavin said that he had asked President Reagan for his support, and that Mr. Reagan ''listened sympathetically.''
''He feels it is important we be forthcoming,'' said Gavin.
Reagan has yet to give final approval for the credit speedup. The Office of Management and Budget still has to make its determination on the matter.
The original plan was for Mexico to get the $500 million in credits for food, grains, and oilseed in the last quarter of this year, starting Oct. 1. The $500 million is part of $1.7 billion being provided under concessionary (favorable) terms. If the new Mexican request is agreed to, the credits could be provided within a matter of days.
''They need the grains,'' said Gavin. ''They need the foodstuffs. . . . There's been a great drought. Production has not been sufficient to feed what is still a burgeoning population.''
Gavin is also in Washington to help prepare for Reagan's first meeting with Mexico's President Miguel de la Madrid Hurtado since Mr. de la Madrid took office in December. The two leaders are to meet in mid-August at La Paz, Mexico, to discuss a wide range of issues, including the debt problem, trade, and Central America. Gavin hopes that such meetings between the American and Mexican leaders can become more frequent.
The ambassador described relations between Washington and Mexico, the US's third-largest trading partner, as healthy. But he acknowledged that the two countries have some differences, including ''certain differences of understanding'' on Central America.
''Mexico and the United States also have, I'm convinced, the same goals in Central America, and the same aspirations for the people,'' said Gavin. ''There's no question we both recognize that the problems that exist there are based upon generations, if not centuries, of economic and social injustices. We don't happen to believe, however, that you should hand over power to people because they're pointing a gun at you.
''We also - it's a matter of record - supported Nicaragua, gave them aid. Now we see that they don't have freedom of the press, don't allow freedom of the church . . . .
''Mexico seems to see these things a little differently,'' Gavin continued.
While pursuing more conservative policies at home, Mexico has tended to lean to the left in its foreign policy. Since the takeover of Nicaragua by the leftist-led Sandinistas in 1979, the Mexicans have aided the new regime in the fields of agriculture, education, and oil exploration. Mexico also provides oil on concessionary terms to Nicaragua. It has maintained friendly ties with Cuba.
Some observers contend that Mexico uses its ties with Cuba and leftist forces in Central America to emphasize its independence from the US and to try to appease Mexico's leftist political opposition. At the same time, the Mexicans have spoken in favor of maintaining political ''pluralism'' in Central America, including Nicaragua, a goal that is also espoused by the US.
Ambassador Gavin praises Mexico's political and financial leaders for taking ''heroic'' belt-tightening measures as part of the agreement made with the IMF. The Mexican government has increased taxes, kept interest rates high, and cut subsidies and imports. It hopes to get close this year to one of the goals set in the IMF agreement, which is to slash by half the deficit of 17.9 percent of gross domestic product, bringing it down to 8.5 percent of GDP. Earlier this month, the government decided to increase by 41 percent the price of corn tortillas.
''I think they are coming to grips rather well with the situation,'' Gavin says. ''But there's no guarantee that they're out of the woods yet. . . . There's a lot of hard work that needs to be done yet, and sacrifices to be made.''