Group of seven in gym detained by principal (6)
I believe the answer is:
heptad
'group of seven' is the definition.
(I've seen this before)
'gym detained by principal' is the wordplay.
'gym' becomes 'pt'.
'detained by' is an insertion indicator (I've seen this in other clues).
'principal' becomes 'head' ('head' can be a synonym of 'principal').
'pt' placed inside 'head' is 'HEPTAD'.
'in' is the link.
(Other definitions for heptad that I've seen before include "Set of seven" , "Odd grouping" , "A seven-strong group" , "A series or group of seven" , "one over the eight? Not quite that many!" .)