WASHINGTON — Education Secretary Betsy DeVos told a Senate committee on Tuesday that the federal commission on school safety set up this year after the Parkland, Fla., school massacre will not focus on the role guns play in school violence.

The comments, provided in testimony before the Senate subcommittee that oversees education spending, perplexed senators who questioned how the commission, led by Ms. DeVos and convened by President Trump, could avoid the subject when it was a military-style assault rifle that left 17 students and staff dead at Marjory Stoneman Douglas High School.

“That’s not part of the commission’s charge, per se,” Ms. DeVos said in response to a question from Senator Patrick J. Leahy, Democrat of Vermont, about whether the commission would look at the role of firearms in the gun violence that has plagued the nation’s schools.

“So we’ll look at gun violence in schools, but not look at guns? An interesting concept,” Mr. Leahy said in response.