"Clearly, we need to make it far easier to confine the violent and mentally deranged into mental institutions," Trump said in a speech at a convention in Houston of the National Rifle Association, a gun rights advocacy group.
Tuesday's fatal shooting of 19 pupils and two teachers in Uvalde, Texas, by an 18-year-old gunman equipped with an AR-15 style semiautomatic rifle again focused attention on the NRA, a major donor to Congress members, mostly Republicans.
On suggestions to improve the security of schools, Trump said every school should have a single point of entry, strong fencing and metal detectors, adding there should also be a police official or an armed guard at all times in every school.
"This is not a matter of money. This is a matter of will. If the United States has $40 billion to send to Ukraine, we can do this," he said, referring to Washington's financial and military support for Ukraine after Russia's invasion in February.
The former US president also called for eliminating gun-free school zones, adding that such zones leave victims with no means to defend themselves in case of an attack by an armed person.
"As the age-old saying goes, the only way to stop a bad guy with a gun is a good guy with a gun," Trump added.
"The existence of evil is one of the very best reasons to arm law-abiding citizens."
Video images of the main auditorium in Houston, which holds about 3,600 people, showed it to be about half-full as Trump took the stage on Friday afternoon.