{"record":{"id":"e83451a608f6aa21","repo":"googleapis/mcp-toolbox","slug":"unknown-source-type-q","errorCode":null,"errorMessage":"unknown source type: %q","messagePattern":"unknown source type: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/sources.go","lineNumber":50,"sourceCode":"\nvar sourceRegistry = make(map[string]SourceConfigFactory)\n\n// Register registers a new source type with its factory.\n// It returns false if the type is already registered.\nfunc Register(sourceType string, factory SourceConfigFactory) bool {\n\tif _, exists := sourceRegistry[sourceType]; exists {\n\t\t// Source with this type already exists, do not overwrite.\n\t\treturn false\n\t}\n\tsourceRegistry[sourceType] = factory\n\treturn true\n}\n\n// DecodeConfig decodes a source configuration using the registered factory for the given type.\nfunc DecodeConfig(ctx context.Context, sourceType string, name string, decoder *yaml.Decoder) (SourceConfig, error) {\n\tfactory, found := sourceRegistry[sourceType]\n\tif !found {\n\t\treturn nil, fmt.Errorf(\"unknown source type: %q\", sourceType)\n\t}\n\tsourceConfig, err := factory(ctx, name, decoder)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse source %q as %q: %w\", name, sourceType, err)\n\t}\n\treturn sourceConfig, err\n}\n\n// SourceConfig is the interface for configuring a source.\ntype SourceConfig interface {\n\tSourceConfigType() string\n\tInitialize(ctx context.Context, tracer trace.Tracer) (Source, error)\n}\n\n// Source is the interface for the source itself.\ntype Source interface {\n\tSourceType() string\n\tToConfig() SourceConfig","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/sources.go#L32-L68","documentation":"DecodeConfig looked up the source's type string in the source registry and found no registered factory — the YAML declares a `type` that Toolbox does not know (typo, or a source built into a different binary).","triggerScenarios":"Thrown at internal/sources/sources.go:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the source `type` spelling in tools.yaml against the supported sources list","Ensure the source kind is compiled into the running Toolbox binary","Upgrade to a version that supports the source type"],"exampleFix":null,"handlingStrategy":"validation","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"}