Just posting an update. Was able to get the toolbox search working. I referenced the logic based on this old post
here.
Basically, after getting the block def toolbox content, i filter those block defs by creating a new headless workspace, and instantiate a blockObject = new Blockly.Block(headlessWorkspace, blockDef.type) then get the blockObject.toString() which gives all string in the rendered block.
Since I expect toolbox contents are static, we can just append the toString() values to the block defs at once. this will be then used to get the filtered blocks when searching text.
No need to get the block object from Blockly.Blocks since it didn't give the right toString() call.