In its first major interpretation of statutes here involving the placing of "bugs" by police, the U.S. Court of Appeals ruled yesterday that such an electronic survellance was illegal even though it was approved in advance by a federal judge.

The "bugs" was illegal because the warrant issued by the judge was not narrowly drawn as to specifically how many entries could be made by the police is placing it and how those entries could be made, the three-judge federal appeals panel said.

The ruling - by U.S. Circuit Chief Judge David L. Bazelon and Circuit Judge J. Skelly Wright and Spottswood Robinson III - upholds a similar decision by U.S. District Judge Gerhard A. Gesell.

Gesell, and the appellate judges, rule that evidence gathered through the use of the "bug" could not be used against defendants in a large drug conspiracy case here.

Federal prosecutors here, who indicated yesterday they would attempt to appeal the ruling to the U.S. Supreme Court, argued that they followed the proper procedure in placing the bug by discussing their plans in detail with the original judge who approved it.

However, the appellate court said those discussions between prosecutors and U.S. District Judge Oliver Gasch were not kept "on the record" or specified in the warrant that was utimately issued. Therefore, the warrant Gasch signed was not specific enough to pass the legal test, they added.

"If police are to be permitted to enter private premises ot conceal eavesdropping devices . . . they at least must be required to procedd in accordance with the authorization of a warrant narrowly tailored to the demonstrated demands of the situation." Judge Wright wrote in a 67-page opinion.

The police decided to use the "bug" instead of a wiretap in investigating an alleged drug ring because the major suspect in the case mistakenly believed his telephone was already under surveillance and would not discuss narcotic activity an telephone.

After getting the judge's approval, the police used a bomb scare ruse to plant the "bug" in the Meljerveen Ltd. Shoe Circus located at 4815 Georgia Ave. NW. The "bug" did not work when it was first installed, so the police used a similar bomb scared ruse the second time to replace it.

In the order signed by Gasch, the Police were given the right to nenter or re-enter the building "in any manner, including, but not limited to, breaking and entering or other surreptitious entry . . ."

However, prosecutors and police later said they decided to use the bomb scare ruse rather that breaking and entering because the latter tactic had "Watergate overtones."