How to close my sunroof on 99 Ford contour?

I check for debris but it hard to see anything. The motor works and the sunroof is only slid back half way. It van go backwards and will only slid up an inch and make a grinding noise. Sounds like something stuck but like I said I can't see much. What can I do?

Maybe something stuck in the motor itself.

It slides on gear/tooth and when an obstruction in the track, rust or debris, which you can't see, gets in the way, it will not progress beyond that point. Considering much of the inner workings are concealed, you would not be able to easily see or tell what is causing the obstruction. You should take it to a shop and consider having it removed and replaced with a solid sheet of metal, and repainted.