{"record":{"id":"74f71772769d1182","repo":"googleapis/mcp-toolbox","slug":"group-q-not-found","errorCode":null,"errorMessage":"group %q not found","messagePattern":"group %q not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/internal/skills/command.go","lineNumber":299,"sourceCode":"func (c *skillsCmd) buildSkillContents(toolsMap map[string]tools.Tool, groupsMap map[string]group.Group) (map[string]skillContent, error) {\n\tprimitiveMgr := primitives.NewPrimitiveManager(nil, nil, nil, toolsMap, nil, groupsMap)\n\n\tskillsToContents := make(map[string]skillContent)\n\n\tgetToolsFromGroup := func(g group.Group) map[string]tools.Tool {\n\t\tgroupTools := make(map[string]tools.Tool)\n\t\tfor _, name := range g.ToolNames {\n\t\t\tif tool, ok := toolsMap[name]; ok {\n\t\t\t\tgroupTools[name] = tool\n\t\t\t}\n\t\t}\n\t\treturn groupTools\n\t}\n\n\tif c.group != \"\" {\n\t\tg, ok := primitiveMgr.GetGroup(c.group)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"group %q not found\", c.group)\n\t\t}\n\n\t\tskillsToContents[c.name] = skillContent{tools: getToolsFromGroup(g), description: c.descriptionFor(g)}\n\t\treturn skillsToContents, nil\n\t}\n\n\tif c.toolset != \"\" {\n\t\tg, ok := primitiveMgr.GetGroup(c.toolset)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"toolset %q not found\", c.toolset)\n\t\t}\n\n\t\tskillsToContents[c.name] = skillContent{tools: getToolsFromGroup(g), description: c.description}\n\t\treturn skillsToContents, nil\n\t}\n\n\tif len(groupsMap) <= 1 {\n\t\t// Default to all tools if no named group found. The default nameless","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/cmd/internal/skills/command.go#L281-L317","documentation":"`buildSkillContents` throws \"group %q not found\" when the `--group` flag passed to `skills-generate` names a group that does not exist in the initialized primitive manager. The lookup is `primitiveMgr.GetGroup(c.group)`; if no group with that exact key was built from the config, the command aborts. Group names are exact string keys from the `groupConfigMaps` in the config file.","triggerScenarios":"`toolbox skills-generate --group <name>` where `<name>` is not defined under the config's `groups:` section, or differs by case/typo from the defined group key; the group failed to initialize earlier so it never registered in the manager.","commonSituations":"Typo in the group name; passing a toolset name to `--group`; renaming a group in the config without updating scripts/CI that invoke skills-generate; the config file loaded differs from the one defining the group.","solutions":["List groups in your config file (`groups:` section) and make sure `--group` matches a key exactly (case-sensitive)","If you meant a toolset, use `--toolset` instead of `--group` (they are mutually exclusive flags)","Confirm you pointed `--config-file`/`--prebuilt-config` at the file that actually defines the group","Re-run initialization; if the wrapped init error (index 70) also appears, fix the group definition error first"],"exampleFix":"// before\ntoolbox skills-generate --group my_group --output-dir skills\n// after (group key in config is \"my-group\")\ntoolbox skills-generate --group my-group --output-dir skills","handlingStrategy":"validation","validationCode":"// Check the group exists in the config before invoking\nb, _ := os.ReadFile(cfgPath)\nvar cfg struct { Groups map[string]yaml.Node `yaml:\"groups\"` }\n_ = yaml.Unmarshal(b, &cfg)\nif _, ok := cfg.Groups[\"my-group\"]; !ok {\n\treturn fmt.Errorf(\"group %q not defined in %s\", \"my-group\", cfgPath)\n}","typeGuard":null,"tryCatchPattern":"if _, ok := primitiveMgr.GetGroup(name); !ok {\n\t// list available groups to aid the user\n\treturn fmt.Errorf(\"group %q not found; available: %v\", name, primitiveMgr.GroupNames())\n}","preventionTips":["Match group keys exactly (case-sensitive) from the config's `groups:` section","Remember `--group` and `--toolset` are mutually exclusive; pick the right one","Update scripts/CI whenever a group is renamed in the config","Generate skills from the same config file you validated (`--config-file`)"],"tags":["go","config","cli-flag","group"],"backgroundTag":"named-resource-not-found","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}