@item is a nil reference; it isn't pointing to an object, which means that #tool_data doesn't exist (because it's not a method that belongs to NilClass).
You'd have to follow the code through and see why @item isn't being set to something valid. Is it possible that there is a conflict with another script you are using? If there are other scripts, you should first try to isolate the script that is causing the issue.
As a small rant: this is why scripters should enforce type checking rather than assuming that the item will be fine. At the very a least, a simple:
unless @item.nil?
often helps avoid these errors just happening and going unhandled.