googleapis/mcp-toolbox · error

group %q declared more than once

Error message

group %q declared more than once

What it means

Error "group %q declared more than once" thrown in googleapis/mcp-toolbox.

Source

Thrown at internal/server/config.go:340

				return nil, nil, nil, nil, nil, nil, fmt.Errorf("prompt %q declared more than once", name)
			}
			promptConfigs[name] = c
		case "group":
			c, err := UnmarshalYAMLGroupConfig(ctx, name, resource)
			if err != nil {
				if len(file.Docs) > 1 {
					return nil, nil, nil, nil, nil, nil, fmt.Errorf("document %d: error unmarshaling %s %q: %w", docIndex, kind, name, err)
				}
				return nil, nil, nil, nil, nil, nil, fmt.Errorf("error unmarshaling %s: %w", kind, err)
			}
			if groupConfigs == nil {
				groupConfigs = make(GroupConfigs)
			}
			if _, exists := groupConfigs[name]; exists {
				if name == "" {
					return nil, nil, nil, nil, nil, nil, fmt.Errorf("more than one default (nameless) group declared; only one is allowed")
				}
				return nil, nil, nil, nil, nil, nil, fmt.Errorf("group %q declared more than once", name)
			}
			groupConfigs[name] = c
		default:
			if len(file.Docs) > 1 {
				return nil, nil, nil, nil, nil, nil, fmt.Errorf("%s invalid kind %q", formatDocLocation(docIndex, keyToken(doc.Body, "kind"), doc.Body), kind)
			}
			return nil, nil, nil, nil, nil, nil, fmt.Errorf("invalid kind %s", kind)
		}
	}
	// Fold legacy toolsets into groups. An explicit `kind: group` of the same name
	// takes precedence over a toolset (matching the prior server-side behavior); warn
	// when a toolset is shadowed this way.
	if len(toolsetGroups) > 0 {
		if groupConfigs == nil {
			groupConfigs = make(GroupConfigs)
		}
		for name, gc := range toolsetGroups {
			if _, shadowed := groupConfigs[name]; shadowed {

View on GitHub (pinned to 8cc6e09de2)

When it happens

Trigger: Thrown at internal/server/config.go:340 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/ee72bd490fbb8234. Report an issue: GitHub.