The incident happened at Harlescott Junior School after the boys found the knife in a bush on their way to school.
A West Mercia Police spokeswoman said: “We were called after a knife had been taken off a child who had come into school with it. The matter is being dealt with by the school."
Steph Peters, executive headteacher, said: "Staff were alerted to this immediately when the boys came on site.
"It was dealt with swiftly, according to school policy and ensuring the safety of all concerned.
"The police were called to come and take away the item.
"Any incident where a pupil brings a dangerous item on to the school site will not be tolerated and will always be quickly and firmly dealt with."