Sears, Roebuck . Co., the nation's largest retailer, today reported an 0.5 percent drop in August sales, while several other major retailers' reports indicated sales gains were slim or were just about keeping pace with inflation.

Among the biggest gainers was K Mart Corp., which recorded a 13.2 percent jump in sales over the August 1978 level. But consumer prices are running 11.3 percent ahead of a year ago, eroding much of the nominal increase.

Sears, whose receipts have been running consistently behind those of a year ago, due in part to changes in merchandising strategies, had sales of $1.516 billion in the four weeks ended Aug. 25. A year ago, August sales totaled $1.524 billion.

K Mart, the second-largest general retail chain, tallied sales of $917 million, up from $810 million, while third-ranked J. C. Penney logged a 3.1 percent sales gain. Penney's sales came to $874 million, against $848 million last August.

J. C. Penney Chairman Donald V. Seibert attributed the firm's gain to back-to-school sales and strong catalogue sales.

F. W. Woolworth sales were 12.8 percent higher and a record total for the month. Chairman Edward F. Gibbons said the firm's foreign subsidiaries "performed particularly well."

Montgomery Ward, a unit of Mobil Corp., said retail sales were slow "except in Florida" and attributed its 4.4 percent gain to significant increases in sales of catalogue merchandise.

Walter Loeb, retail analyst for Morgan Stanley . Co., said the "rebound in consumer buying" reflected cool weather the last two weeks of the reporting period that fueled early purchase of school apparel and supplies.

"It seems there was a bit more discretionary income for consumers, and this is encouraging," Loeb said, "but we're extremely cautious in projecting any real strength in final demand."

Retailers have "not relaxed their vigilance in preventing any buildup in inventories," Loeb noted.

Sears, whose declines have resulted more from its focus away from discounting than from economic conditions, went from a 13.4 percent increase in June 1978, to a 1.5 percent rise in August last year and has reported declines since that time.

Since the year-to-year comparisions will now reflect earlier declines, a Sears spokesman said the firm would expect the "trend evident in August 1979 to continue."

G. C. Murphy Co., McKeesport, Pa., had a 7.2 percent sales gain in August on 38 fewer stores than in August 1978 and Zayre Corp., Framington, Mass., had a 12 percent increase.

Sales of the five biggest chains in August and for the first seven months of 1979:

Sears Roebuck . Co. -- $1.52 billion compared with $1.524 billion in August, 1978; seven months, $9.99 billion, compared with $10.88 billion in the same period of 1978.

K Mart Corp. -- $917 billion, up from $810 billion in the same month last year; $6.5 billion, up from $5.69 billion in the 30-week period last year.

J. C. Penney Co. Inc. -- $874 million, compared with $848 million in August 1978; seven months, $5.69 billion, up from 5.456 billion in 1978.

F. W. Woolworth Co. -- $591.9 million, up from $435.95 million last year; 30 weeks, $3.46 billion, up from $3.08 billion in 1978.

Montgomery Ward -- $408.08 million, compared with $390.9 million in 1978; 30 weeks, $2.8 billion, up from $2.657 billion in the first seven months last year.