Does glass provide total cover?
Does it provide total cover against a sniper rifle?
What if it's made from bullet-proof glass?
It's up to the DM to decide if something provides cover, and that is going to depend on what you are attacking with. Which is why we have human DMs to make the judgment call.
FWIW, 3.Xe had a formal definition for Line of Effect as a distinctly different mechanic from Line of Sight. Some magic effects required one, some the other, and some both. The rules can be found in the SRD and could be easily adapted to 5e by any group that wanted a bit of a crunchier answer than just "DM fiat".