{"record":{"id":"e2448640b8810f1b","repo":"googleapis/mcp-toolbox","slug":"prebuilt-source-tool-for-s-not-found-s","errorCode":null,"errorMessage":"prebuilt source tool for '%s' not found. %s","messagePattern":"prebuilt source tool for '(.+?)' not found\\. (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/prebuiltconfigs/prebuiltconfigs.go","lineNumber":55,"sourceCode":"\tif err != nil {\n\t\tpanic(fmt.Sprintf(\"Unexpected Error: %v\\n\", err))\n\t}\n}\n\n// Getter for the prebuiltToolsSources\nfunc GetPrebuiltSources() []string {\n\treturn prebuiltToolsSources\n}\n\n// Get prebuilt tools for a source\nfunc Get(prebuiltSourceConfig string) ([]byte, error) {\n\tcontent, ok := prebuiltToolYAMLs[prebuiltSourceConfig]\n\tif !ok {\n\t\tprebuiltHelpSuffix := \"no prebuilt configurations found.\"\n\t\tif len(prebuiltToolsSources) > 0 {\n\t\t\tprebuiltHelpSuffix = fmt.Sprintf(\"available: %s\", strings.Join(prebuiltToolsSources, \", \"))\n\t\t}\n\t\terrMsg := fmt.Errorf(\"prebuilt source tool for '%s' not found. %s\", prebuiltSourceConfig, prebuiltHelpSuffix)\n\t\treturn nil, errMsg\n\t}\n\treturn content, nil\n}\n\n// Load all available pre built tools\nfunc loadPrebuiltToolYAMLs() (map[string][]byte, []string, error) {\n\ttoolYAMLs := make(map[string][]byte)\n\tvar sourceTypes []string\n\tentries, err := prebuiltConfigsFS.ReadDir(\"tools\")\n\tif err != nil {\n\t\terrMsg := fmt.Errorf(\"failed to read prebuilt tools %w\", err)\n\t\treturn nil, nil, errMsg\n\t}\n\n\tfor _, entry := range entries {\n\t\tlowerName := strings.ToLower(entry.Name())\n\t\tif !entry.IsDir() && (strings.HasSuffix(lowerName, \".yaml\")) {","sourceCodeStart":37,"sourceCodeEnd":73,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/prebuiltconfigs/prebuiltconfigs.go#L37-L73","documentation":"Get looks up the embedded YAML for a prebuilt source configuration (e.g. \"postgres\") in the map populated at init time. It throws this error when the requested prebuilt source key does not exist; the message helpfully appends the list of available sources, or notes that none were found.","triggerScenarios":"Calling prebuiltconfigs.Get with a source name that has no embedded YAML — e.g. --prebuilt-configs misspelled on the CLI, a source removed/renamed in a newer version, or Get called before init populated the map (empty registry).","commonSituations":"Typo in a tool's prebuilt config name in tools.yaml (e.g. \"postgress\" instead of \"postgres\"); using a prebuilt config from documentation that targets a version where the source was renamed; embedding a new source without adding its YAML under internal/prebuiltconfigs/tools/.","solutions":["Check the 'available: ...' suffix in the error and use an exact source name from that list.","Verify the prebuilt config name in your tools YAML or --prebuilt-configs flag matches a YAML filename under internal/prebuiltconfigs/tools/ (filename minus .yaml is the key).","Rebuild the binary from the current source so init() embeds the latest prebuilt YAMLs.","If adding a new source, add its tools/<name>.yaml so it registers."],"exampleFix":"// before\n# tools.yaml\nkind: postgress\ntoolsets: {}...\n// after\nkind: postgres\ntoolsets: {}...","handlingStrategy":"validation","validationCode":"sources, _ := prebuiltconfigs.PrebuiltToolsSources() // or parse the 'available:' suffix\nif !slices.Contains(sources, requestedKind) {\n\treturn fmt.Errorf(\"kind %q is not a prebuilt config; available: %v\", requestedKind, sources)\n}","typeGuard":null,"tryCatchPattern":"yaml, err := prebuiltconfigs.Get(kind)\nif err != nil {\n\tvar available string\n\tif i := strings.Index(err.Error(), \"available:\"); i >= 0 {\n\t\tavailable = err.Error()[i:]\n\t}\n\treturn fmt.Errorf(\"unknown prebuilt kind %q (%s)\", kind, available)\n}","preventionTips":["Copy prebuilt config kind names exactly from docs or the `available:` list in the error.","Pin your config to a toolbox version and verify kinds against that version's docs.","Add a config linter/test that resolves every `kind:` at CI time."],"tags":["configuration","prebuilt-configs","yaml"],"backgroundTag":"unknown-config-source","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}