'Detect whether the tool with the given id is installed.
:param tool_id: exact id of the tool
:type tool_id:  str
:return:      list with available versions
"return type: list'

def _detect(self, trans, tool_id):

    tools = self.app.toolbox.get_tool(tool_id, get_all_versions=True)
    detected_versions = []
    if tools:
        for tool in tools:
            if (tool and tool.allow_user_access(trans.user)):
                detected_versions.append(tool.version)
    return detected_versions
