'Build list of filters to check tools against given current context.'

def build_filters(self, trans, **kwds):

    filters = deepcopy(self.default_filters)
    if trans.user:
        for (name, value) in trans.user.preferences.items():
            if value.strip():
                user_filters = listify(value, do_strip=True)
                category = ''
                if (name == 'toolbox_tool_filters'):
                    category = 'tool'
                elif (name == 'toolbox_section_filters'):
                    category = 'section'
                elif (name == 'toolbox_label_filters'):
                    category = 'label'
                if category:
                    validate = getattr(trans.app.config, ('user_%s_filters' % category), [])
                    self.__init_filters(category, user_filters, filters, validate=validate)
    elif kwds.get('trackster', False):
        filters['tool'].append(_has_trackster_conf)
    return filters
