googleapis/mcp-toolbox · error
unable to parse prebuilt tool configuration for '%s': %w
Error message
unable to parse prebuilt tool configuration for '%s': %w
What it means
When loading a prebuilt configuration, the toolbox fetches the embedded YAML and runs parser.ParseConfig. If parsing/unmarshaling into the Config struct fails, this error wraps the underlying parser error and startup aborts.
Source
Thrown at cmd/internal/options.go:225
logger.ErrorContext(ctx, errMsg.Error())
return isCustomConfigured, errMsg
}
}
}
}
sourceName, toolsetName, _ := strings.Cut(configName, "/")
buf, err := prebuiltconfigs.Get(sourceName)
if err != nil {
logger.ErrorContext(ctx, err.Error())
return isCustomConfigured, err
}
// Parse into Config struct
parsed, err := parser.ParseConfig(ctx, buf)
if err != nil {
errMsg := fmt.Errorf("unable to parse prebuilt tool configuration for '%s': %w", configName, err)
logger.ErrorContext(ctx, errMsg.Error())
return isCustomConfigured, errMsg
}
if toolsetName != "" {
// Legacy toolsets are folded into groups at unmarshal, so the named
// toolset resolves as a group.
targetGroup, exists := parsed.Groups[toolsetName]
if !exists {
var available []string
for k := range parsed.Groups {
if k == "" {
continue
}
available = append(available, k)
}
slices.Sort(available)
errMsg := fmt.Errorf("toolset '%s' not found in prebuilt configuration '%s'. Available toolsets: %s", toolsetName, sourceName, strings.Join(available, ", "))View on GitHub (pinned to 8cc6e09de2)
Solutions
- Read the wrapped parser error after the colon for the exact YAML problem
- Upgrade or reinstall the toolbox binary to match the prebuilt config expectations
- Try a different, known-good prebuilt config (e.g. 'postgres/postgres-sql') to isolate the issue
- If using a custom config file, verify it with the parser before launch
Example fix
// before --prebuilt postgres/nonexistent-toolset // after --prebuilt postgres/postgres-sql
Defensive patterns
Strategy: validation
Validate before calling
// sanity check: use a known-good prebuilt config before exotic ones ./toolbox --prebuilt postgres/postgres-sql --prebuilt your-experimental/one
Try / catch
parsed, err := parser.ParseConfig(ctx, buf)
if err != nil {
return fmt.Errorf("unable to parse prebuilt tool configuration for '%s': %w", configName, err)
} Prevention
- Keep the toolbox binary version aligned with documented prebuilt configs
- Verify YAML configs parse before deploying (toolbox parses at startup)
When it happens
Trigger: parser.ParseConfig fails on the embedded prebuilt YAML for the requested configName — malformed embedded file, or a toolset/group reference inside it that cannot be resolved.
Common situations: Running a mismatched toolbox binary version against a prebuilt config name that resolves to incompatible content, or a typo in the toolset portion producing an unresolvable reference.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- prebuilt source tool for '%s' not found. %s
- invalid prebuilt config format '%s'. Did you mean '%s/%s'? U
- toolset '%s' not found in prebuilt configuration '%s'. Avail
- no prebuilt tool configurations were loaded.%w
- error parsing argument: %w
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/0d73e1e93239dc69.
Report an issue: GitHub.