You'd have to use a Gmod addon or ulx module to do so, as that function isn't included in ULX by default.
A (retired?) Team Ulysses member made URestrict which can be found in our Releases section of the forum, but his last post was that he would no longer be maintaining it and the few pages before that report various issues (while at same time, some say it still works).
You may wish to try it to see if the tool restriction in it works.
If you know/want to learn lua, you may also wish to see Gmod's CanTool hook.
Gamemode.CanTool The example there would break/remove all other CanTool hooks in it's current example though.