{"record":{"id":"4189620bf0962796","repo":"zylon-ai/private-gpt","slug":"only-one-skillartifact-is-supported-per-skill-mana","errorCode":null,"errorMessage":"Only one SkillArtifact is supported per skill management tool.","messagePattern":"Only one SkillArtifact is supported per skill management tool\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"private_gpt/components/tools/processors/skill_management_processor.py","lineNumber":112,"sourceCode":"                        builder.build_list_skills(\n                            name=tool.name or SKILL_LIST_TOOL_NAME,\n                            type=tool.type or SKILL_LIST_TOOL_NAME + \"_v1\",\n                        )\n                    ],\n                )\n        return built_any\n\n    def _make_builder(\n        self, request: ResolvedChatRequest, tool: Any\n    ) -> SkillManagementToolBuilder:\n        tool_context = _get_tool_context(request, tool)\n        skill_artifacts = [a for a in tool_context if isinstance(a, SkillArtifact)]\n        if not skill_artifacts:\n            raise ValueError(\n                \"Skill management tools require a SkillArtifact in the tool context.\"\n            )\n        if len(skill_artifacts) > 1:\n            raise ValueError(\n                \"Only one SkillArtifact is supported per skill management tool.\"\n            )\n        return SkillManagementToolBuilder(\n            skill_service=self._skill_service,\n            skill_filter=skill_artifacts[0].skill_filter,\n            skill_injection_mode=self._settings.skills.skill_injection_mode,\n        )\n","sourceCodeStart":94,"sourceCodeEnd":120,"githubUrl":"https://github.com/zylon-ai/private-gpt/blob/4a030776a31a901ad80b1bf4d7faa2c1a367efbb/private_gpt/components/tools/processors/skill_management_processor.py#L94-L120","documentation":"Raised by the SkillManagementProcessor when a skill management tool's context contains more than one SkillArtifact. SkillManagementToolBuilder takes a single skill_filter, so multiple skill scopes on one tool are ambiguous.","triggerScenarios":"Attaching two or more SkillArtifact entries to the same skill management tool in one request.","commonSituations":"Users multi-selecting skill sets in a UI; composing a request that unions several skill scopes; accidentally duplicating the artifact during request assembly.","solutions":["Keep exactly one SkillArtifact per skill management tool","Issue separate requests (or separate tool entries) for additional skill scopes","Merge the desired skill sets into one SkillArtifact with a combined skill_filter if the filter type allows"],"exampleFix":"# before\ncontext=[SkillArtifact(filter_a), SkillArtifact(filter_b)]\n# after\ncontext=[SkillArtifact(filter_a)]  # separate request for filter_b","handlingStrategy":"validation","validationCode":"skills = [a for a in (tool_context or []) if isinstance(a, SkillArtifact)]\nassert len(skills) == 1, \"skill management tools accept exactly one SkillArtifact\"","typeGuard":null,"tryCatchPattern":"try:\n    resp = await client.chat(request)\nexcept ValueError as e:\n    if \"Only one SkillArtifact\" in str(e):\n        # keep first SkillArtifact, issue extra requests for the others\n        raise","preventionTips":["Make skill scope single-select in clients","Warn or dedupe when merging request templates that each carry a SkillArtifact","Document one-artifact-per-tool as an invariant next to tool context APIs"],"tags":["tools","validation","skills"],"backgroundTag":null,"analyzedSha":"4a030776a31a901ad80b1bf4d7faa2c1a367efbb","analyzedAt":"2026-08-15T03:51:26.951Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}