From SA Mafia Wiki
The Gunsmith is an investigative role which can determine whether or not a chosen player carries a firearm. While it is generally accepted that all Mafia will have a gun (though a Godfather may or may not), so will a Cop, Vigilante, and/or certain other power roles.
The name of the role can change depending on the flavor of the game, while still functionally remaining the same; e.g. a "Blacksmith" can find if someone has a Sword or not.