{"record":{"id":"fdad328375ce1b07","repo":"googleapis/mcp-toolbox","slug":"t-is-an-excluded-value","errorCode":null,"errorMessage":"%t is an excluded value","messagePattern":"%t is an excluded value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/util/parameters/parameters.go","lineNumber":1027,"sourceCode":"\nvar _ Parameter = &BooleanParameter{}\n\n// BooleanParameter is a parameter representing the \"boolean\" type.\ntype BooleanParameter struct {\n\tCommonParameter `yaml:\",inline\"`\n\tDefault         *bool `yaml:\"default\"`\n}\n\nfunc (p *BooleanParameter) Parse(v any) (any, error) {\n\tnewV, ok := v.(bool)\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(\"%t is not an allowed value\", newV)\n\t}\n\tif p.IsExcludedValues(newV) {\n\t\treturn nil, fmt.Errorf(\"%t is an excluded value\", newV)\n\t}\n\treturn newV, nil\n}\n\nfunc (p *BooleanParameter) GetAuthServices() []ParamAuthService {\n\treturn p.AuthServices\n}\n\nfunc (p *BooleanParameter) GetDefault() any {\n\tif p.Default == nil {\n\t\treturn nil\n\t}\n\treturn *p.Default\n}\n\n// Manifest returns the manifest for the BooleanParameter.\nfunc (p *BooleanParameter) Manifest() ParameterManifest {\n\t// only list ParamAuthService names (without fields) in manifest","sourceCodeStart":1009,"sourceCodeEnd":1045,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/util/parameters/parameters.go#L1009-L1045","documentation":"This error is thrown by BooleanParameter.Parse when a parsed boolean parameter's value is in the parameter's excludeValues list. The toolbox validates that incoming parameter values match the declared type, are in allowedValues (if set), and are not in excludeValues. Being excluded means the value has the right type but is explicitly disallowed by the tool configuration.","triggerScenarios":"Invoking a tool whose boolean parameter declares excludeValues (e.g. [true]) and passing one of those excluded values (e.g. true) in the tool invocation request body.","commonSituations":"A tool author banned a boolean like {allow: false} to prevent destructive behavior and the client sends the banned value; tool config was updated to add excludeValues but callers still send old values.","solutions":["Change the parameter value in your tool invocation to one not listed in the parameter's excludeValues.","Check the tool's YAML configuration to see which values are excluded and update your client accordingly.","If the exclusion is too restrictive, ask the tool owner to remove the value from excludeValues and redeploy the toolbox."],"exampleFix":"// before (tool call body)\n{\"myFlag\": true}  // excludeValues: [true]\n// after\n{\"myFlag\": false}","handlingStrategy":"validation","validationCode":"const excluded = [true];\nif (excluded.includes(body.myFlag)) {\n  throw new Error('myFlag value is excluded by the tool config');\n}","typeGuard":"function isBoolean(v) { return typeof v === 'boolean'; }","tryCatchPattern":null,"preventionTips":["Review the tool manifest for allowedValues/excludeValues before calling.","Keep client payloads in sync with the latest tools.yaml.","Centralize tool invocation validation in a shared client helper."],"tags":["parameter-validation","boolean","mcp-toolbox"],"backgroundTag":"parameter-value-excluded","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"}