At this point you have exceeded any of my experience. I might put the whole thing back together, and disconnect the clip from the roof panel and try to operate the electric motor to see if the motor will pull the cable all the way in and out. If it does, I believe there is an adjustment to make to adjust the clutch mechanism. If the clutch mechanism is worn, it may slip when it gets loaded pulling and pushing the roof panel. Do another search on sunroof clutch adjustments as there are some very detailed instructions in a few other threads on this subject. If the gear teeth were stripped or broken off I think you would hear that.
In the end I think I might locate a used one in a junk yard or try FastLane. Fixing the one you have is likely possible, but you will need some instructions that I am unable to give you. And you will need some parts if you broke the manual operating nut off or find the gear box needs work.
Sorry I cannot be of much more help, and good luck, Jim
1986 Euro 190E 2.3-16 (291,000 miles),
1998 E300D TurboDiesel, 231,000 miles -purchased with 45,000,
1988 300E 5-speed 252,000 miles,
1983 240D 4-speed, purchased w/136,000, now with 222,000 miles.
2009 ML320CDI Bluetec, 89,000 miles
1971 220D (250,000 miles plus, sold to father-in-law),
1975 240D (245,000 miles - died of body rot),
1991 350SD (176,560 miles, weakest Benz I have owned),
1999 C230 Sport (45,400 miles),
1982 240D (321,000 miles, put to sleep)