How does Alexa determine what commands a device supports?

The color bulb is the TP-Link LB130. I wrote the Service Manager and DTH for this and others in the link below.

TP-Link Bulbs and Plugs Control.

I also have osram lightify bulbs, but not color.