{"record":{"id":"bc0f7d2cf0bcc74d","repo":"crewAIInc/crewAI","slug":"both-use-case-and-tags-cannot-be-none","errorCode":null,"errorMessage":"Both `use_case` and `tags` cannot be `None`","messagePattern":"Both `use_case` and `tags` cannot be `None`","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/composio_tool/composio_tool.py","lineNumber":109,"sourceCode":"            ),\n            composio_action=function,\n            **kwargs,\n        )\n\n    @classmethod\n    def from_app(\n        cls,\n        *apps: t.Any,\n        tags: list[str] | None = None,\n        use_case: str | None = None,\n        **kwargs: t.Any,\n    ) -> list[te.Self]:\n        \"\"\"Create toolset from an app.\"\"\"\n        if len(apps) == 0:\n            raise ValueError(\"You need to provide at least one app name\")\n\n        if use_case is None and tags is None:\n            raise ValueError(\"Both `use_case` and `tags` cannot be `None`\")\n\n        if use_case is not None and tags is not None:\n            raise ValueError(\n                \"Cannot use both `use_case` and `tags` to filter the actions\"\n            )\n\n        from composio import ComposioToolSet\n\n        toolset = ComposioToolSet()\n        if use_case is not None:\n            return [\n                cls.from_action(action=action, **kwargs)\n                for action in toolset.find_actions_by_use_case(*apps, use_case=use_case)\n            ]\n\n        return [\n            cls.from_action(action=action, **kwargs)\n            for action in toolset.find_actions_by_tags(*apps, tags=tags)  # type: ignore[arg-type]","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/composio_tool/composio_tool.py#L91-L127","documentation":"Error \"Both `use_case` and `tags` cannot be `None`\" thrown in crewAIInc/crewAI.","triggerScenarios":"Thrown at lib/crewai-tools/src/crewai_tools/tools/composio_tool/composio_tool.py:109 when the library encounters an invalid state.","commonSituations":"Occurs when both use_case and tags are None when filtering Composio actions. Provide either use_case or tags.","solutions":["Provide either `use_case` or `tags` to filter actions; at least one is required."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}