To be clear, there is no such thing like a “command state”.
An Item can receive a command and it can store a state.
If you are using an Item via the UI, every change will result in a command, sent to the Item.
If using the Item in a rule, you can chose between .sendCommand(<command>) (which will result in a received command for the Item) and .postUpdate(<state>) (which will result in a received update for the Item). The Item won’t keep the command in any way.
But of course you can trigger the rule with the received command trigger and then use the implicit variable receivedCommand which will contain the received command
If using more than one trigger, the triggeringItemName implicit variable will contain the name of the Item which triggered the rule (as a string).
I’m not sure about how to access those implicit variables in blockly, but for sure there is a way to do so, see
UPDATE: It’s the block openHAB->Run & Process->contextual info->received command (this is a drop down element)