This is a end cap for a cheap Bic pen that holds a 6mm x 5mm magnet.
This magnet actually measures 6mm x 4.75mm, but I'm sure when I bought them they were sold as 6x5. The recess for the magnet is designed for a 4.75mm magnet though. You'll need to glue the magnet in.
Print on its side for strength.