According to Chris Brady's excellent 737 Information Site, the 737-NG models have a pin fitted to the undercarriage housing which detects loose tread on the maingear tyres at gear retraction and presumably give an indication to the flight crew.
The pin is supposed to cause the gear to extend again and can only be reset on the ground by engineering staff.
Presumably a Ppruner with access to
VB engineering may be able to shed further light on how the crew became aware of the problem.
Alert ATCO in the tower may also have noticed something abnormal, got the binocs out and advised said crew. Would be a pretty fine observation though, especially at busy times.