You don't say how many miles are on the car.
Automatic transmissions on Mercedes cars from the late 1990s to about 2007 or 2008 are often left un-serviced, even by the dealership service teams, because MBZ removed the transmission service entry from the recommended service list for those years in order to compete with other car makers' claim of "No service required!"
The automatic transmissions should *always* be given a lubrication service at 40,000 mile intervals (drain old, contaminated oil, replace filters, refill). Most of the transmissions will last through two missed transmission services, but a large number of them then have transmission problems starting around 100,000-115,000 miles. This usually means a $4K to $8K transmission replacement, for any shop where the mechanic is unwilling to overhaul the old transmission at a reasonable rate; they just replace it with a new or remanufactured transmission. (A good shop and a knowledgeable mechanic can usually do an overhaul on the bench for around $3K or so, but this is becoming rare to find because it is quite time consuming to do and locks up a service bay while the car is apart...)
The behavior you describe sounds like it could be one of or a combination of a couple of things:
- gear selection mechanism clogged up and working inconsistently
- valve body damaged or worn
- clutch packs in the transmission worn out
- insufficient fluid level or clogged filter not allowing trans to maintain proper operating pressures for the mechanism
The very first thing to do, however, is to pull a sample of the transmission oil and examine it for current condition. If it smells burnt, it's at least worn out. If it feels gritty or larger bits of metal/friction material come out with it, and the mileage is high, the likelihood is that the transmission needs an overhaul. Changing the oil and filter could restore consistent, proper operation for a while, but depending upon mileage, it might not last long.
My SLK280 had 85,000 miles on it when I bought it. I had the automatic transmission oil checked when I had the pre-purchase inspection done. It smelled slightly burnt and very slightly gritty, but analysis showed no metallic content and the shifting seemed sound. I had the transmission service done immediately after buying the car, with an extra flush of fresh oil, and no significant crud came out. Since I did that, the transmission's behavior has been transformed: it feels like a different car, shifts consistently and crisply in both C and S modes, up and down shifts manually perfectly. Even the service is somewhat expensive (about $700) but once every 40,000 miles is well worth the price—it should allow the transmission to last 300,000 miles or more.
Good luck with it! Take it to a qualified Mercedes-Benz independent shop ... they'll generally cost a lot less than the dealer and often give better, more informed service.