googleapis/mcp-toolbox · error

%t is an excluded value

Error message

%t is an excluded value

What it means

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.

Source

Thrown at internal/util/parameters/parameters.go:1027

var _ Parameter = &BooleanParameter{}

// BooleanParameter is a parameter representing the "boolean" type.
type BooleanParameter struct {
	CommonParameter `yaml:",inline"`
	Default         *bool `yaml:"default"`
}

func (p *BooleanParameter) Parse(v any) (any, error) {
	newV, ok := v.(bool)
	if !ok {
		return nil, &ParseTypeError{p.Name, p.Type, v}
	}
	if !p.IsAllowedValues(newV) {
		return nil, fmt.Errorf("%t is not an allowed value", newV)
	}
	if p.IsExcludedValues(newV) {
		return nil, fmt.Errorf("%t is an excluded value", newV)
	}
	return newV, nil
}

func (p *BooleanParameter) GetAuthServices() []ParamAuthService {
	return p.AuthServices
}

func (p *BooleanParameter) GetDefault() any {
	if p.Default == nil {
		return nil
	}
	return *p.Default
}

// Manifest returns the manifest for the BooleanParameter.
func (p *BooleanParameter) Manifest() ParameterManifest {
	// only list ParamAuthService names (without fields) in manifest

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Change the parameter value in your tool invocation to one not listed in the parameter's excludeValues.
  2. Check the tool's YAML configuration to see which values are excluded and update your client accordingly.
  3. If the exclusion is too restrictive, ask the tool owner to remove the value from excludeValues and redeploy the toolbox.

Example fix

// before (tool call body)
{"myFlag": true}  // excludeValues: [true]
// after
{"myFlag": false}
Defensive patterns

Strategy: validation

Validate before calling

const excluded = [true];
if (excluded.includes(body.myFlag)) {
  throw new Error('myFlag value is excluded by the tool config');
}

Type guard

function isBoolean(v) { return typeof v === 'boolean'; }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05). Data as JSON: /api/errors/fdad328375ce1b07. Report an issue: GitHub.