{"record":{"id":"8af60c0b1014aeb9","repo":"github/github-mcp-server","slug":"s-must-be-one-of-s","errorCode":null,"errorMessage":"%s must be one of: %s","messagePattern":"(.+?) must be one of: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/mcpcurl/main.go","lineNumber":274,"sourceCode":"\t\tisRequired := slices.Contains(tool.InputSchema.Required, name)\n\n\t\t// Enhance description to indicate if parameter is optional\n\t\tdescription := prop.Description\n\t\tif !isRequired {\n\t\t\tdescription += \" (optional)\"\n\t\t}\n\n\t\tswitch prop.Type {\n\t\tcase \"string\":\n\t\t\tcmd.Flags().String(name, \"\", description)\n\t\t\tif len(prop.Enum) > 0 {\n\t\t\t\t// Add validation in PreRun for enum values\n\t\t\t\tcmd.PreRunE = func(cmd *cobra.Command, _ []string) error {\n\t\t\t\t\tfor flagName, property := range tool.InputSchema.Properties {\n\t\t\t\t\t\tif len(property.Enum) > 0 {\n\t\t\t\t\t\t\tvalue, _ := cmd.Flags().GetString(flagName)\n\t\t\t\t\t\t\tif value != \"\" && !slices.Contains(property.Enum, value) {\n\t\t\t\t\t\t\t\treturn fmt.Errorf(\"%s must be one of: %s\", flagName, strings.Join(property.Enum, \", \"))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn nil\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"number\":\n\t\t\tcmd.Flags().Float64(name, 0, description)\n\t\tcase \"integer\":\n\t\t\tcmd.Flags().Int64(name, 0, description)\n\t\tcase \"boolean\":\n\t\t\tcmd.Flags().Bool(name, false, description)\n\t\tcase \"array\":\n\t\t\tif prop.Items != nil {\n\t\t\t\tswitch prop.Items.Type {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tcmd.Flags().StringSlice(name, []string{}, description)\n\t\t\t\tcase \"object\":","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/cmd/mcpcurl/main.go#L256-L292","documentation":"Error \"%s must be one of: %s\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at cmd/mcpcurl/main.go:274 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":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}