John Nimmo, who pleaded guilty to sending "menacing" tweets to a feminist campaigner, also targeted Labour MP Stella Creasy, a court heard.
Prosecutor Alison Morgan said Ms Creasy had suffered a "substantial impact" as a result of "these events."
More top news
A spokeswoman for Glasgow City Council said a weapon had been discharged outside St George's Primary School in Penilee.
Theresa May will not announce the UK will leave the customs union until Philip Hammond is on board - and that is not certain.
A guide to Donald Trump's presidential inauguration and the key events that will be happening.