{"record":{"id":"0514367734b7dd87","repo":"googleapis/mcp-toolbox","slug":"the-default-nameless-group-cannot-declare-tools","errorCode":null,"errorMessage":"the default (nameless) group cannot declare 'tools' or 'prompts'; it always contains all configured tools and prompts","messagePattern":"the default \\(nameless\\) group cannot declare 'tools' or 'prompts'; it always contains all configured tools and prompts","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/config.go","lineNumber":575,"sourceCode":"\tif err := dec.DecodeContext(ctx, &raw); err != nil {\n\t\treturn toolsetConfig, fmt.Errorf(\"unable to unmarshal tools: %s\", err)\n\t}\n\treturn tools.ToolsetConfig{Name: name, ToolNames: raw[\"tools\"]}, nil\n}\n\nfunc UnmarshalYAMLGroupConfig(ctx context.Context, name string, r map[string]any) (group.GroupConfig, error) {\n\tdec, err := util.NewStrictDecoder(r)\n\tif err != nil {\n\t\treturn group.GroupConfig{}, fmt.Errorf(\"error creating decoder: %s\", err)\n\t}\n\tgc := group.GroupConfig{Name: name}\n\tif err := dec.DecodeContext(ctx, &gc); err != nil {\n\t\treturn group.GroupConfig{}, fmt.Errorf(\"unable to unmarshal group: %s\", err)\n\t}\n\t// The default (nameless) group always contains all configured tools and\n\t// prompts, so it may only set a description.\n\tif name == \"\" && (len(gc.ToolNames) > 0 || len(gc.PromptNames) > 0) {\n\t\treturn group.GroupConfig{}, fmt.Errorf(\"the default (nameless) group cannot declare 'tools' or 'prompts'; it always contains all configured tools and prompts\")\n\t}\n\treturn gc, nil\n}\n\nfunc UnmarshalYAMLPromptConfig(ctx context.Context, name string, r map[string]any) (prompts.PromptConfig, error) {\n\t// Look for the 'type' field. If it's not present, typeStr will be an\n\t// empty string, which prompts.DecodeConfig will correctly default to \"custom\".\n\tvar resourceType string\n\tif typeVal, ok := r[\"type\"]; ok {\n\t\tvar isString bool\n\t\tresourceType, isString = typeVal.(string)\n\t\tif !isString {\n\t\t\treturn nil, fmt.Errorf(\"invalid 'type' field for prompt %q (must be a string)\", name)\n\t\t}\n\t}\n\tdec, err := util.NewStrictDecoder(r)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error creating decoder: %s\", err)","sourceCodeStart":557,"sourceCodeEnd":593,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/config.go#L557-L593","documentation":"Error \"the default (nameless) group cannot declare 'tools' or 'prompts'; it always contains all configured tools and prompts\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/config.go:575 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"}