Whenever Mayor Doug DeGood encountered one of the ubiquitous White House aides attending the annual Conference of Mayors here this week, he tried to tell the story of Toledo -- an auto town where 16,000 workers have been laid off in recent months.

Tax revenues are down, and DeGood has had to close firehouses and lay off nurses in public schools.

He wants more federal aid and more federal jobs, but he is far from certain the message has gotten through. The cities "sort of got thrown overbroad as soon as things got a little bit tough," he says.

DeGood is more outspoken than most, but his words reflect a pervasive feeling of fear and uncertainty among the nation's mayors.

The nagging question for the mayors of even most prosperous cities is how long the recession will last and how sharply it will cut. Dallas, to take one example, is cruising along with only 4 percent unemployment, according to Mayor Robert S. Folsom. But he said he has seen high interest rates ravage housing and retail auto businesses in his city, and when he contemplates the nation's economic fortunes, his brow furrows and he draws up his broad shoulders.

"I don't think we have seen the recession yet," he said.

They are deeply concerned about conditions in their inner cities. The story of high black youth unemployment is told over and over from Portland, Maine, to New Orleans to Oakland. For many the rioting in Miami came like the sudden memory of a pot left simmering on the back of the stove.

Although the Democrats here endorsed President Carter for reelection in a vote earlier this week, they are critical of the new emphasis in Congress and in the White House on strengthening defense, paring social programs and tightening the national belt. Incoming conference president Richard G. Hatcher of Gary, Ind., called it "this current mania in Washington to balance the federal budget at any cost."

Dissatisfaction is all the greater because the change comes after a brief period of relative good times for cities. Although the conditions in the ghettos have not been greatly improved, a lot of federally financed rebuilding has changed downtown areas across the country.

Talk to any mayor here and he will tell you with a certain amount of civic boosterism about his downtown -- the new hotel and museum complex being built on the waterfront in Portland, Maine; neighborhood sprucing-up projects in downtown Lancaster, Pa.; the ugly abandoned coal plant in Seattle that has been turned into a park.

Though there are still millions of dollars for such programs in pending budget proposals in Washington, the mayors worry about what, the future will bring.

President Carter's speech Tuesday provided little solace. He delivered a stern lecture about the need for "fiscal discipline" and said he did not intend to do anything that would refuel inflation. He did hold out a vague, unspecified promise to take some action if the recession deepened and unemployment continued to rise. Toledo's DeGood and mayors in other cities hard-hit by the recession hung their hopes on this part of the president's message.

Despite Carter's admonitions, the mayors went ahead with approval of an elaborate package to ease the effects of the recession. It calls for more federal jobs an extension of the number of weeks that unemployment benefits can be paid and an infusion of federal dollars to cities hit hardest by the economic downturn.

Despite anti-Carter grumbling on the sidelines, there was no love for Sen. Edward M. Kennedy here. And while the mayors were surprised and impressed at proposals advanced by independent presidential candidate John B. Anderson, few here see him as being anything more than a spoiler in the election. Democratic mayors watched with mild interest as their Republican counterparts met with Ronald Reagan, hoping that they might moderate the GOP presidential candidate's views on spending for the cities.

Carter has given the mayors unusual access and sent them millions of dollars in aid, and, however unhappy they might be with his budget cuts, they appear to be sticking with him.

"I'm not saying that Carter's perfect," said the usually ebullient Carter Cheerleader, Mayor Maynard Jackson of Atlanta, "just that he's the best out there."