In the car, it serves a shady purpose (5)
I believe the answer is:
visor
'in' is the definition.
Although both the answer and definition are singular nouns, I can't see how they can define each other.
I can't explain the remainder of the clue.
Can you help me to learn more?
(Other definitions for visor that I've seen before include "Screen to filter glare" , "Part of an armour helmet" , "Movable shield on helmet" , "Moveable piece of helmet" , "Peak of a cap" .)