{"record":{"id":"c64610456ef3fe88","repo":"googleapis/mcp-toolbox","slug":"unable-to-parse-prompt-q-as-resourcetype-q-w","errorCode":null,"errorMessage":"unable to parse prompt %q as resourceType %q: %w","messagePattern":"unable to parse prompt %q as resourceType %q: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/prompts/prompts.go","lineNumber":60,"sourceCode":"\treturn true\n}\n\n// DecodeConfig looks up the registered factory for the given type and uses it\n// to decode the prompt configuration.\nfunc DecodeConfig(ctx context.Context, resourceType, name string, decoder *yaml.Decoder) (PromptConfig, error) {\n\tfactory, found := promptRegistry[resourceType]\n\tif !found && resourceType == \"\" {\n\t\tresourceType = \"custom\"\n\t\tfactory, found = promptRegistry[resourceType]\n\t}\n\n\tif !found {\n\t\treturn nil, fmt.Errorf(\"unknown prompt type: %q\", resourceType)\n\t}\n\n\tpromptConfig, err := factory(ctx, name, decoder)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to parse prompt %q as resourceType %q: %w\", name, resourceType, err)\n\t}\n\treturn promptConfig, nil\n}\n\ntype PromptConfig interface {\n\tPromptConfigType() string\n\tInitialize() (Prompt, error)\n}\n\ntype Prompt interface {\n\tGetDesc() string\n\tGetArguments() Arguments\n\tSubstituteParams(parameters.ParamValues) (any, error)\n\tParseArgs(map[string]any, map[string]map[string]any) (parameters.ParamValues, error)\n\tManifest() Manifest\n\tToConfig() PromptConfig\n}\n","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/prompts/prompts.go#L42-L78","documentation":"Error \"unable to parse prompt %q as resourceType %q: %w\" thrown in googleapis/mcp-toolbox.","triggerScenarios":"Thrown at internal/prompts/prompts.go:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}