{"record":{"id":"ee72bd490fbb8234","repo":"googleapis/mcp-toolbox","slug":"group-q-declared-more-than-once","errorCode":null,"errorMessage":"group %q declared more than once","messagePattern":"group %q declared more than once","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/config.go","lineNumber":340,"sourceCode":"\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"prompt %q declared more than once\", name)\n\t\t\t}\n\t\t\tpromptConfigs[name] = c\n\t\tcase \"group\":\n\t\t\tc, err := UnmarshalYAMLGroupConfig(ctx, name, resource)\n\t\t\tif err != nil {\n\t\t\t\tif len(file.Docs) > 1 {\n\t\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"document %d: error unmarshaling %s %q: %w\", docIndex, kind, name, err)\n\t\t\t\t}\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"error unmarshaling %s: %w\", kind, err)\n\t\t\t}\n\t\t\tif groupConfigs == nil {\n\t\t\t\tgroupConfigs = make(GroupConfigs)\n\t\t\t}\n\t\t\tif _, exists := groupConfigs[name]; exists {\n\t\t\t\tif name == \"\" {\n\t\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"more than one default (nameless) group declared; only one is allowed\")\n\t\t\t\t}\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"group %q declared more than once\", name)\n\t\t\t}\n\t\t\tgroupConfigs[name] = c\n\t\tdefault:\n\t\t\tif len(file.Docs) > 1 {\n\t\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"%s invalid kind %q\", formatDocLocation(docIndex, keyToken(doc.Body, \"kind\"), doc.Body), kind)\n\t\t\t}\n\t\t\treturn nil, nil, nil, nil, nil, nil, fmt.Errorf(\"invalid kind %s\", kind)\n\t\t}\n\t}\n\t// Fold legacy toolsets into groups. An explicit `kind: group` of the same name\n\t// takes precedence over a toolset (matching the prior server-side behavior); warn\n\t// when a toolset is shadowed this way.\n\tif len(toolsetGroups) > 0 {\n\t\tif groupConfigs == nil {\n\t\t\tgroupConfigs = make(GroupConfigs)\n\t\t}\n\t\tfor name, gc := range toolsetGroups {\n\t\t\tif _, shadowed := groupConfigs[name]; shadowed {","sourceCodeStart":322,"sourceCodeEnd":358,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/config.go#L322-L358","documentation":"Error \"group %q declared more than once\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/config.go:340 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}