googleapis/mcp-toolbox · error
unable to parse prompt %q as resourceType %q: %w
Error message
unable to parse prompt %q as resourceType %q: %w
What it means
Error "unable to parse prompt %q as resourceType %q: %w" thrown in googleapis/mcp-toolbox.
Source
Thrown at internal/prompts/prompts.go:60
return true
}
// DecodeConfig looks up the registered factory for the given type and uses it
// to decode the prompt configuration.
func DecodeConfig(ctx context.Context, resourceType, name string, decoder *yaml.Decoder) (PromptConfig, error) {
factory, found := promptRegistry[resourceType]
if !found && resourceType == "" {
resourceType = "custom"
factory, found = promptRegistry[resourceType]
}
if !found {
return nil, fmt.Errorf("unknown prompt type: %q", resourceType)
}
promptConfig, err := factory(ctx, name, decoder)
if err != nil {
return nil, fmt.Errorf("unable to parse prompt %q as resourceType %q: %w", name, resourceType, err)
}
return promptConfig, nil
}
type PromptConfig interface {
PromptConfigType() string
Initialize() (Prompt, error)
}
type Prompt interface {
GetDesc() string
GetArguments() Arguments
SubstituteParams(parameters.ParamValues) (any, error)
ParseArgs(map[string]any, map[string]map[string]any) (parameters.ParamValues, error)
Manifest() Manifest
ToConfig() PromptConfig
}
View on GitHub (pinned to 8cc6e09de2)
When it happens
Trigger: Thrown at internal/prompts/prompts.go:60 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/c64610456ef3fe88.
Report an issue: GitHub.