The youth, aged 13, appeared on petition at Livingston Sheriff Court yesterday.
He faces five charges in connection with an incident at the school on Friday.
He made no plea and was freed on bail after spending the weekend in custody at St Mary’s Kenmure secure unit, at Bishopbriggs, near Glasgow.
The accused, who lives in West Lothian, was charged with assault to injury and assault to severe injury and permanent disfigurement.
He was also accused of threatening or abusive behaviour, having an article with a blade or point in a public place and attempting to defeat the ends of justice.
He is expected to make a second court appearance to be committed for trial next week.
Police said on Friday that they had detained a youth after a boy suffered a serious facial injury and was treated in hospital.