Boston Mayor Marty Walsh and Suffolk County District Attorney Rachael Rollins called for legislative action from Congress after two mass shootings in El Paso, Texas, and Dayton, Ohio, left 31 people dead over the weekend.

At an event promoting community policing work in Hyde Park on Monday, Walsh, a Democrat, criticized Senate President Mitch McConnell, a Republican, for blocking two gun control bills from going to a vote in the U.S. Senate.

“Do your job,” Walsh said. “I mean — do your job. It's that simple. Take a vote on it, and if you don't want to vote for it, don't vote for it, but at least have the courage to take a position on it. Don't hide behind leadership — that's what's happening here in Washington, they're hiding behind leadership.”

Walsh referred to two bills: an act that would prohibit most person-to-person firearm transfers without a background check, andanother bill that would extend the deadline for the background check system to get back to firearms dealers before they can make a sale.

Read more: State Gun Laws: How New England Stacks Up

Though both bills passed in the U.S. House of Representatives in February with wide margins, McConnell effectively blocked the legislation from moving forward by placing it on the Senate calendar instead of referring it to a committee for a vote.

McConnell described the shootings as “sickening” in a tweet Sunday. “Two horrifying acts of violence in less than 24 hours,” McConnell wrote. “We stand with law enforcement as they continue working to keep Americans safe and bring justice.”

“Mitch McConnell won't let the vote happen, [and] why won't he let the vote happen? Because it will pass in the United States Senate,” Walsh said.

Rollins said she’s "sick of 'thoughts and prayers,'" and expressed concern over the possibility of a mass shooting in Massachusetts.

“I'm incredibly frustrated,” Rollins said. “We're seeing people with significant mental health issues, we're seeing an uprise in white supremacy and nationalism and hate crimes against people as a result of the political climate we're in today.”

Investigators are working to determine if an anti-immigrant screed posted online was written by the shooter in the El Paso, Texas, attack, as they consider whether to prosecute the massacre as a hate crime.

Though Massachusetts has some of the strictest gun laws in the nation, Rollins said it's too easy to get around those rules by going through another nearby state.

“I think Massachusetts is a leader. We have some of the strongest gun laws, but we are less than a 45 minute drive from Rhode Island or New Hampshire,” said Rollins, who attended the same community event Monday. “We need some federal action, and we need to make sure that there's uniformity across all of the states regarding what the requirements are.”