In court, their lawyer Dave Sayes said in order to protect the community, their target was to shut down a tinnie house that earlier sold drugs to a 12-year-old relative rather than enter into a fight with anyone.
Mr Sayes said the reason for their offending was relayed to court as an explanation and should not be taken as a mitigating or aggravating feature.
Judge Greg Davis said about 8.30pm on July 23 the brothers went to a house in Otangarei where a children's birthday party was being held.
Josh Blyth was armed with a sledgehammer and his brother had a crowbar.
A man at the party picked up a machete and swung it at them. The brothers left after failing to find any drugs in the house. No one was hurt in the incident.
Judge Davis said whatever the motive, confronting the occupants of a house with weapons was serious and shouldn't be condoned.
A couple of men, a woman and a child were inadvertently caught up in the act, he said. James Blyth was sentenced to two-and-half years in prison on all charges and his brother was jailed for two years.