Its purpose is defensive, the palace aide said (8)
I believe the answer is:
palisade
'its purpose is defensive the palace' is the definition.
I can't tell whether this defines the answer.
'aide said' is the wordplay.
I cannot really see how this works, but
'aide' could be 'pa' (abbreviation for personal assistant) and 'pa' is located in the answer.
an anagram of 'said' is 'isad' which is located in the answer.
This may be the basis of the clue (or it may be nonsense).
Can you help me to learn more?
(Other definitions for palisade that I've seen before include "Enclosure of stakes" , "Fence made of stakes" , "Protecting fence" , "defence work" , "fencing" .)