A story published yesterday erroneously reported that the town of Somerset in Montgomery County used a federal grant to build its swimming pool and tennis courts. The grant was used to buy parkland along Wisconsin Avenue not connected with the recreational facilities, which were constructed with money obtained by the sale of bonds.

When the biggest employer in Cambridge, Md., left town two years ago, officials of that economically depressed Eastern Shore city of 12,000 turned to the federal government for help.

Yesterday, at a seminar on Capitol Hill for representatives of 69 small Maryland towns and U.S. officials, Cambridge city engineer Robert A. Cassidy outlined how his town nearly went broke in an unsuccessful effort to play the grantsmanship game with the federal bureaucracy.

"Fill out a grant application," Cassidy recalled the regional director of the Economic Development Administration telling Cambridge officials, and many of the 140 mayors and council members nodded in sympathetic understanding.

They had come to the Capitol at the invitation of Sen. Charles McC. Mathias (R-Md.) to find out how to get federal aid for their towns, but they spent much of the day criticizing inconsistencies in the grant application process.

The Cambridge case was a classic.

Cassidy, who also serves as the city's deputy director of public works, said Cambridge officials went to the federal economic development regional office in Philadelphia seeking a $3 million emergency grant to buy land and build water and sewer lines to attract a new industry.

"Too small," Cassidy quoted the regional officials as saying after examining the application. "Think big."

So the mayor and his advisers went back home and hit the drawing boards. After months of work and consultation with Maryland officials including Acting Gov. Blair Lee, they returned to Philadelphia with an admittedly grandiose plan that sought $42 million in federal aid.

"Too big," Cassidy said the same economic development advisers said.

On their third trip to Philadelphia, Cassidy said, "I knew we were in trouble right away because they held the meeting in the basement." Again the revamped application was turned down by an economic development official, who pointed to boxes stacked to the ceiling and said, "all of those are grant applications."

With the rejection, Cassidy and his group returned to Cambridge in defeat. "We had spent so much time and money -- about $75,000 -- trying to get the grant that we didn't have enough left to try again," he said yesterday.

As representatives from the Economic Development Administration and other federal agencies tried to explain how such foul-ups occur, a brawny man from Hagerstown rose from the back of the room and said "I'll tell you how to get their attention."

M. G. (Mike) McGauhey, administrator of water pollution control for Hagerstown, pointed a finger at the federal panelists and boomed. "You put on your hob-nailed boots and walk across their desks until they say, 'Give it to them and get that wild man out of here.'"

McGauhey credited his tactics with bringtin in grants totaling$15 million for the Hagerstown water plant.

Presidential assistant Jack Watson said the Carter administration is pledged to simplify and standardize grant applications.

The day-long seminar was not all tension and confrontation. Many local officials said they were pleased with the advice given by federal representatives.

Mathias, who said he believed the meeting was the first of its kind, pointed out that there are 1,075 federal assistance programs, and despite the complaints, Maryland ranks third among the states in the money it receives from the federal government in proportion to its population.

Not all of the town officials came to the session expecting to find a federal windfall.

"I don't think we qualify for most of the programs," smiled Mayor Walter J. Behr of Somerset, a community of 426 families in Montgomery County. But in the past, Somerset has received federal grants to build a swimming pool and tennis courts, and it annually gets $6,000 in revenue sharing. "I just want to make sure we're not missing anything," Behr said.