googleapis/mcp-toolbox · error

prompt does not exist: %q

Error message

prompt does not exist: %q

What it means

Error "prompt does not exist: %q" thrown in googleapis/mcp-toolbox.

Source

Thrown at internal/group/group.go:80

// prompt exists in the provided maps, building the membership sets used by
// ContainsTool and ContainsPrompt.
func (gc GroupConfig) Initialize(toolsMap map[string]tools.Tool, promptsMap map[string]prompts.Prompt) (Group, error) {
	if !tools.IsValidName(gc.Name) {
		return Group{}, fmt.Errorf("invalid group name: %q", gc.Name)
	}

	toolNameSet := make(map[string]struct{}, len(gc.ToolNames))
	for _, name := range gc.ToolNames {
		if _, ok := toolsMap[name]; !ok {
			return Group{}, fmt.Errorf("tool does not exist: %q", name)
		}
		toolNameSet[name] = struct{}{}
	}

	promptNameSet := make(map[string]struct{}, len(gc.PromptNames))
	for _, name := range gc.PromptNames {
		if _, ok := promptsMap[name]; !ok {
			return Group{}, fmt.Errorf("prompt does not exist: %q", name)
		}
		promptNameSet[name] = struct{}{}
	}

	return Group{GroupConfig: gc, toolNameSet: toolNameSet, promptNameSet: promptNameSet}, nil
}

// NewGroup builds a Group directly from its config, deriving the membership sets
// from the declared tool and prompt names. It skips the existence checks
// performed by GroupConfig.Initialize and is intended for tests and callers that
// have already validated the names.
func NewGroup(config GroupConfig) Group {
	toolNameSet := make(map[string]struct{}, len(config.ToolNames))
	for _, name := range config.ToolNames {
		toolNameSet[name] = struct{}{}
	}
	promptNameSet := make(map[string]struct{}, len(config.PromptNames))
	for _, name := range config.PromptNames {

View on GitHub (pinned to 8cc6e09de2)

When it happens

Trigger: Thrown at internal/group/group.go:80 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05). Data as JSON: /api/errors/51929efb1935577f. Report an issue: GitHub.