last week I tried to open my moon roof which I seldom do. It only opened up and wouldn't slide open. It stuck with the front raised but will not close or slide.
moon roof repair on 2004 Toyota Camry
Sounds like the track is binding. It may need lubricated, or there could be an issue with the cables binding or the track mechanism being damaged. Get an experienced pair of eyes on it to see what the trouble is.