tools: add 'get_type_by_name' and 'get_instantiated_type_by_name'