diff --git a/lib/galaxy/tool_util/toolbox/base.py b/lib/galaxy/tool_util/toolbox/base.py index 4529f85d40db..4742e7b7c32f 100644 --- a/lib/galaxy/tool_util/toolbox/base.py +++ b/lib/galaxy/tool_util/toolbox/base.py @@ -96,7 +96,12 @@ def __init__(self, toolbox: "AbstractToolBox"): def has_tool(self, tool_id: str) -> bool: toolbox = self.__toolbox - return tool_id in toolbox._tools_by_id or tool_id in toolbox._tools_by_old_id + # tool_id could be full guid, old tool id (no toolshed and version info) or versionless guid. + return ( + tool_id in toolbox._tools_by_id + or tool_id in toolbox._tools_by_old_id + or bool(toolbox._lineage_map.lineage_map.get(tool_id)) + ) def get_tool(self, tool_id: str): return self.__toolbox.get_tool(tool_id)