{"record":{"id":"378b5184585e431a","repo":"googleapis/mcp-toolbox","slug":"toolset-q-not-found","errorCode":null,"errorMessage":"toolset %q not found","messagePattern":"toolset %q not found","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/internal/skills/command.go","lineNumber":309,"sourceCode":"\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\n\t\t// group's description (if any) takes precedence over the flag.\n\t\tskillsToContents[c.name] = skillContent{tools: toolsMap, description: c.descriptionFor(groupsMap[\"\"])}\n\t\treturn skillsToContents, nil\n\t}\n\n\t// One skill per group\n\tfor gName, g := range groupsMap {\n\t\tif gName == \"\" {\n\t\t\tcontinue\n\t\t}","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/cmd/internal/skills/command.go#L291-L327","documentation":"`buildSkillContents` throws \"toolset %q not found\" when the `--toolset` flag passed to `skills-generate` names a toolset that is not present in the initialized primitive manager (`primitiveMgr.GetGroup(c.toolset)` fails). Toolsets are registered as groups keyed by their config name, so an unknown or uninitialized name produces this error and stops skill generation.","triggerScenarios":"`toolbox skills-generate --toolset <name>` where `<name>` is not a key in the config's `toolsets:` section (or equivalent prebuilt toolset), is misspelled, or the toolset failed to initialize; note the same `GetGroup` lookup backs both `--group` and `--toolset`.","commonSituations":"Typo in toolset name; passing a group name to `--toolset`; using a toolset removed/renamed in a newer config; forgetting that when neither flag is given all tools are included, so this only fires when the flag is set.","solutions":["Check the `toolsets:` keys in your config file and match `--toolset` exactly (case-sensitive)","Use `--group` instead if the target is a group, not a toolset","Omit `--toolset` entirely to generate a skill from all tools","Verify the loaded config file is the one containing the toolset (`--config-file` path)"],"exampleFix":"// before\ntoolbox skills-generate --toolset myTools\n// after (toolset key in config is \"my-tools\")\ntoolbox skills-generate --toolset my-tools","handlingStrategy":"validation","validationCode":"// Ensure the toolset key exists in the config\nb, _ := os.ReadFile(cfgPath)\nvar cfg struct { Toolsets map[string]yaml.Node `yaml:\"toolsets\"` }\n_ = yaml.Unmarshal(b, &cfg)\nif _, ok := cfg.Toolsets[\"my-tools\"]; !ok {\n\treturn fmt.Errorf(\"toolset %q not defined in %s\", \"my-tools\", cfgPath)\n}","typeGuard":null,"tryCatchPattern":"if _, ok := primitiveMgr.GetGroup(toolsetName); !ok {\n\treturn fmt.Errorf(\"toolset %q not found; available: %v\", toolsetName, primitiveMgr.GroupNames())\n}","preventionTips":["Copy-paste the toolset key directly from the config to avoid typos","Don't pass a group name to `--toolset` — the flags are distinct and mutually exclusive","Omit `--toolset` when you want all tools in one skill","Grep the config for the toolset name before running in automation"],"tags":["go","config","cli-flag","toolset"],"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"}