A man with a stolen Scottish Government security pass claimed he wanted to blow up politicians attending the COP26 summit.
Paul Roberts, 41, also stated he had a desire to "make a dent in Glasgow" on October 19, 2021.
Roberts had earlier gained repeated access to a Scottish Government building using a stolen security pass.
He went on to claim to be employed by the Ministry of Defence to employees at a Scottish Water site.
Roberts also smashed a car window in the city centre in order to "test Glasgow's response to a security breach."
Roberts pled guilty at Glasgow Sheriff Court to behaving in a threatening or abusive manner and three charges of theft. He also admitted recklessly destroying or damaging property without a reasonable excuse.
The court heard Roberts initially entered a Scottish Government building on Waterloo Street claiming to be fixing a golf simulator machine on September 27, 2021.
Roberts walked around the building for 40 minutes before making off with four security cards and two USB sticks. He returned an hour later using a security card to gain entry before leaving after five minutes.
The building manager later found that the items were missing and watched CCTV of the theft.
The matter was then reported to the police.
Roberts entered the building two days later during the early hours of the morning which triggered an alarm. He had fled the scene before officers arrived.
He entered the building for a final time but was clocked by the building manager who contacted the police.
Officers were again unable to trace Roberts who had ran through a fire exit.
Roberts turned up at a homeless unit on October 19 with an injury to his hand.
Prosecutor Emma Baker said: "He told a member of staff that he was going to blow up COP 26 and that he would make a dent in Glasgow.
"He stated to another witness that he 'wants to blow up politicians at COP 26' and made a remark about blowing up cars."
Roberts was traced the following day but was released on special bail conditions.
Several days later, Roberts - who was wearing a high vis jacket and hard hat - was confronted at a car park by an employee.
Roberts stated he was working as a cleaner and fled the scene after the claim was found to be false.
A total of £450 of equipment was later found to have been stolen including the jacket, hard hat, ear defenders and an 'elcometer'.
Later that day, Roberts entered the Scottish Water Site in the city's south side. He was spotted by employees who confronted him about being on the site.
Miss Baker said: "He stated that he was security patrol for the Ministry of Defence and was there to check the site was secure and alarms were checked due to COP26."
Roberts failed to provide identification and was asked to leave the site.
Roberts was finally locked up after smashing the wing mirror of an employee at a casino in the city centre's Springfield Quay on October 27.
Officers attended and were told: "I did it, I'll pay for it."
Miss Baker said: "He made remarks about how easy it would be to blow up the nuclear science building within the nearby hospital grounds.
"He said he was testing the security around Glasgow for the upcoming COP26 conference.
"He stated numerous times that he smashed the wing mirror to test Glasgow's response to a security breach"
Roberts also claimed to be a member of the online group Anonymous and that 140,000 people would be attending the conference to cause "havoc through the city".
Marisa Borland, defending, told the court that his comments to the homeless unit employees were not threats.
The lawyer added: "He was testing police response, highlight different areas and how easy it would be for things to happen."
A further hearing was fixed for next month to determine whether Roberts made threats to the homeless unit employees.
Sheriff Andrew Cubie said: "It is to be determined whether where on the spectrum of harmless fantasist and dangerous activist he is."