{"record":{"id":"ed957f4338a2770b","repo":"googleapis/mcp-toolbox","slug":"unable-to-unmarshal-tools-s","errorCode":null,"errorMessage":"unable to unmarshal tools: %s","messagePattern":"unable to unmarshal tools: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/config.go","lineNumber":558,"sourceCode":"\t\treturn nil, err\n\t}\n\treturn toolCfg, nil\n}\n\nfunc UnmarshalYAMLToolsetConfig(ctx context.Context, name string, r map[string]any) (tools.ToolsetConfig, error) {\n\tvar toolsetConfig tools.ToolsetConfig\n\ttoolList, ok := r[\"tools\"].([]any)\n\tif !ok {\n\t\treturn toolsetConfig, fmt.Errorf(\"tools is missing or not a list of strings: %v\", r)\n\t}\n\tjustTools := map[string]any{\"tools\": toolList}\n\tdec, err := util.NewStrictDecoder(justTools)\n\tif err != nil {\n\t\treturn toolsetConfig, fmt.Errorf(\"error creating decoder: %s\", err)\n\t}\n\tvar raw map[string][]string\n\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}","sourceCodeStart":540,"sourceCodeEnd":576,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/config.go#L540-L576","documentation":"Error \"unable to unmarshal tools: %s\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/config.go:558 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"}