{"record":{"id":"51929efb1935577f","repo":"googleapis/mcp-toolbox","slug":"prompt-does-not-exist-q","errorCode":null,"errorMessage":"prompt does not exist: %q","messagePattern":"prompt does not exist: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/group/group.go","lineNumber":80,"sourceCode":"// prompt exists in the provided maps, building the membership sets used by\n// ContainsTool and ContainsPrompt.\nfunc (gc GroupConfig) Initialize(toolsMap map[string]tools.Tool, promptsMap map[string]prompts.Prompt) (Group, error) {\n\tif !tools.IsValidName(gc.Name) {\n\t\treturn Group{}, fmt.Errorf(\"invalid group name: %q\", gc.Name)\n\t}\n\n\ttoolNameSet := make(map[string]struct{}, len(gc.ToolNames))\n\tfor _, name := range gc.ToolNames {\n\t\tif _, ok := toolsMap[name]; !ok {\n\t\t\treturn Group{}, fmt.Errorf(\"tool does not exist: %q\", name)\n\t\t}\n\t\ttoolNameSet[name] = struct{}{}\n\t}\n\n\tpromptNameSet := make(map[string]struct{}, len(gc.PromptNames))\n\tfor _, name := range gc.PromptNames {\n\t\tif _, ok := promptsMap[name]; !ok {\n\t\t\treturn Group{}, fmt.Errorf(\"prompt does not exist: %q\", name)\n\t\t}\n\t\tpromptNameSet[name] = struct{}{}\n\t}\n\n\treturn Group{GroupConfig: gc, toolNameSet: toolNameSet, promptNameSet: promptNameSet}, nil\n}\n\n// NewGroup builds a Group directly from its config, deriving the membership sets\n// from the declared tool and prompt names. It skips the existence checks\n// performed by GroupConfig.Initialize and is intended for tests and callers that\n// have already validated the names.\nfunc NewGroup(config GroupConfig) Group {\n\ttoolNameSet := make(map[string]struct{}, len(config.ToolNames))\n\tfor _, name := range config.ToolNames {\n\t\ttoolNameSet[name] = struct{}{}\n\t}\n\tpromptNameSet := make(map[string]struct{}, len(config.PromptNames))\n\tfor _, name := range config.PromptNames {","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/group/group.go#L62-L98","documentation":"Error \"prompt does not exist: %q\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/group/group.go:80 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-08T15:18:49.778Z"}