diff --git a/src/backend/base/langflow/base/tools/component_tool.py b/src/backend/base/langflow/base/tools/component_tool.py index 6e3855637..f97df9ad9 100644 --- a/src/backend/base/langflow/base/tools/component_tool.py +++ b/src/backend/base/langflow/base/tools/component_tool.py @@ -27,6 +27,9 @@ if TYPE_CHECKING: from langflow.schema.content_block import ContentBlock +TOOL_TYPES_SET = {"Tool", "BaseTool", "StructuredTool"} + + def _get_input_type(_input: InputTypes): if _input.input_types: if len(_input.input_types) == 1: @@ -165,7 +168,7 @@ class ComponentToolkit: ) -> list[BaseTool]: tools = [] for output in self.component.outputs: - if output.name == TOOL_OUTPUT_NAME: + if output.name == TOOL_OUTPUT_NAME or any(tool_type in output.types for tool_type in TOOL_TYPES_SET): continue if not output.method: diff --git a/src/backend/base/langflow/components/tools/calculator.py b/src/backend/base/langflow/components/tools/calculator.py index ffe0ea00b..c1c8e26ec 100644 --- a/src/backend/base/langflow/components/tools/calculator.py +++ b/src/backend/base/langflow/components/tools/calculator.py @@ -23,7 +23,6 @@ class CalculatorToolComponent(LCToolComponent): name="expression", display_name="Expression", info="The arithmetic expression to evaluate (e.g., '4*4*(33/22)+12-20').", - tool_mode=True, ), ]