Police Scotland said no-one was injured in Tuesday's incident.
A spokesperson for Police Scotland said Inverness Community Beat officers dealt with the matter.
The officers will be working with staff at the school, which has not been named, over the next few days "to provide reassurance to all involved".
Police were called to a school in Inverness after a pupil was found with a knife.