{"record":{"id":"193967fd8633c539","repo":"googleapis/mcp-toolbox","slug":"s-is-an-excluded-value","errorCode":null,"errorMessage":"%s is an excluded value","messagePattern":"(.+?) is an excluded value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/util/parameters/parameters.go","lineNumber":703,"sourceCode":"\n// StringParameter is a parameter representing the \"string\" type.\ntype StringParameter struct {\n\tCommonParameter `yaml:\",inline\"`\n\tDefault         *string `yaml:\"default\"`\n\tEscape          *string `yaml:\"escape\"`\n}\n\n// Parse casts the value \"v\" as a \"string\".\nfunc (p *StringParameter) Parse(v any) (any, error) {\n\tnewV, ok := v.(string)\n\tif !ok {\n\t\treturn nil, &ParseTypeError{p.Name, p.Type, v}\n\t}\n\tif !p.IsAllowedValues(newV) {\n\t\treturn nil, fmt.Errorf(\"%s is not an allowed value\", newV)\n\t}\n\tif p.IsExcludedValues(newV) {\n\t\treturn nil, fmt.Errorf(\"%s is an excluded value\", newV)\n\t}\n\tif p.Escape != nil {\n\t\treturn applyEscape(*p.Escape, newV)\n\t}\n\treturn newV, nil\n}\n\nfunc applyEscape(escape, v string) (any, error) {\n\tswitch escape {\n\tcase escapeBackticks:\n\t\tescaped := strings.ReplaceAll(v, \"`\", \"``\")\n\t\treturn fmt.Sprintf(\"`%s`\", escaped), nil\n\tcase escapeDoubleQuotes:\n\t\tescaped := strings.ReplaceAll(v, `\"`, `\"\"`)\n\t\treturn fmt.Sprintf(`\"%s\"`, escaped), nil\n\tcase escapeSingleQuotes:\n\t\tescaped := strings.ReplaceAll(v, `'`, `''`)\n\t\treturn fmt.Sprintf(`'%s'`, escaped), nil","sourceCodeStart":685,"sourceCodeEnd":721,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/util/parameters/parameters.go#L685-L721","documentation":"StringParameter.Parse rejects the runtime value supplied for a string parameter because it matches an entry in the parameter's 'excludedValues' blacklist. The guard fires at tool invocation time when the caller (or LLM) passes a forbidden value; the offending value is named in the message.","triggerScenarios":"Thrown at internal/util/parameters/parameters.go:703 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a value not listed in the parameter's excludedValues in tools.yaml","Remove the value from excludedValues if it should be permitted"],"exampleFix":null,"handlingStrategy":"validation","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"}