The unnamed boy, 16, arrested in February, also pleaded guilty to possessing prohibited images of children in Birmingham Magistrates' Court, the British newspaper The Mirror reported Monday.
The suspect came to attention of police after FBI agents from the United States notified the Metropolitan Police of comments he made in an online chat room, saying, "20 minutes from, now I am going to storm a high school armed with a Magnum (handgun) and a Beretta (pistol)," prosecutor Mark Topping said.
The teen was sentenced to an initial six-month hospital order under Britain's Mental Health Act, the newspaper reported.
Police: Sword-wielding man demanded free tacos
Sign language interpreter at Mandela service called out as fake on Twitter