googleapis/mcp-toolbox · error

unable to unmarshal tools: %s

Error message

unable to unmarshal tools: %s

What it means

Error "unable to unmarshal tools: %s" thrown in googleapis/mcp-toolbox.

Source

Thrown at internal/server/config.go:558

		return nil, err
	}
	return toolCfg, nil
}

func UnmarshalYAMLToolsetConfig(ctx context.Context, name string, r map[string]any) (tools.ToolsetConfig, error) {
	var toolsetConfig tools.ToolsetConfig
	toolList, ok := r["tools"].([]any)
	if !ok {
		return toolsetConfig, fmt.Errorf("tools is missing or not a list of strings: %v", r)
	}
	justTools := map[string]any{"tools": toolList}
	dec, err := util.NewStrictDecoder(justTools)
	if err != nil {
		return toolsetConfig, fmt.Errorf("error creating decoder: %s", err)
	}
	var raw map[string][]string
	if err := dec.DecodeContext(ctx, &raw); err != nil {
		return toolsetConfig, fmt.Errorf("unable to unmarshal tools: %s", err)
	}
	return tools.ToolsetConfig{Name: name, ToolNames: raw["tools"]}, nil
}

func UnmarshalYAMLGroupConfig(ctx context.Context, name string, r map[string]any) (group.GroupConfig, error) {
	dec, err := util.NewStrictDecoder(r)
	if err != nil {
		return group.GroupConfig{}, fmt.Errorf("error creating decoder: %s", err)
	}
	gc := group.GroupConfig{Name: name}
	if err := dec.DecodeContext(ctx, &gc); err != nil {
		return group.GroupConfig{}, fmt.Errorf("unable to unmarshal group: %s", err)
	}
	// The default (nameless) group always contains all configured tools and
	// prompts, so it may only set a description.
	if name == "" && (len(gc.ToolNames) > 0 || len(gc.PromptNames) > 0) {
		return group.GroupConfig{}, fmt.Errorf("the default (nameless) group cannot declare 'tools' or 'prompts'; it always contains all configured tools and prompts")
	}

View on GitHub (pinned to 8cc6e09de2)

When it happens

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