{"record":{"id":"2eaf67e3595f9bce","repo":"googleapis/mcp-toolbox","slug":"missing-type-field-or-it-is-not-a-string","errorCode":null,"errorMessage":"missing 'type' field or it is not a string","messagePattern":"missing 'type' field or it is not a string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/server/config.go","lineNumber":374,"sourceCode":"\t\t}\n\t\tfor name, gc := range toolsetGroups {\n\t\t\tif _, shadowed := groupConfigs[name]; shadowed {\n\t\t\t\tif l, err := util.LoggerFromContext(ctx); err == nil {\n\t\t\t\t\tl.WarnContext(ctx, fmt.Sprintf(\"group %q shadows a toolset of the same name; using the group definition\", name))\n\t\t\t\t}\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tgroupConfigs[name] = gc\n\t\t}\n\t}\n\n\treturn sourceConfigs, authServiceConfigs, embeddingModelConfigs, toolConfigs, promptConfigs, groupConfigs, nil\n}\n\nfunc UnmarshalYAMLSourceConfig(ctx context.Context, name string, r map[string]any) (sources.SourceConfig, error) {\n\tresourceType, ok := r[\"type\"].(string)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"missing 'type' field or it is not a string\")\n\t}\n\tdec, err := util.NewStrictDecoder(r)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error creating decoder: %w\", err)\n\t}\n\tsourceConfig, err := sources.DecodeConfig(ctx, resourceType, name, dec)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn sourceConfig, nil\n}\n\nfunc UnmarshalYAMLAuthServiceConfig(ctx context.Context, name string, r map[string]any) (auth.AuthServiceConfig, error) {\n\tresourceType, ok := r[\"type\"].(string)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"missing 'type' field or it is not a string\")\n\t}\n\tdec, err := util.NewStrictDecoder(r)","sourceCodeStart":356,"sourceCodeEnd":392,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/server/config.go#L356-L392","documentation":"Error \"missing 'type' field or it is not a string\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/server/config.go:374 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"}