PLAT-5917 - ToolContextUtils does not respect requested type

Fix reverting some of previous change