Fire officials say they responded to the library after reports of a fire on the roof.
When they arrived on scene, roofing contract workers in the middle of re-roofing the library had already put the small blaze out with a fire extinguisher.
Firefighters came in to ensure the fire had not spread.
Bozeman Deputy Fire Chief Greg Megaard says their investigation points to a bonding adhesive used by the roofing contractors as the cause of the fire.
Though they can't say for sure, officials believe either static electricity or a heat gun might have ignited the adhesive.
No one was evacuated from the library.