googleapis/mcp-toolbox · error

unknow param type %s

Error message

unknow param type %s

What it means

getBigtableType maps toolbox parameter type strings to bigtable.SQLType implementations. It only supports boolean, string, integer, float, and array; any other declared parameter type (e.g. `number`, `object`, or a typo like `strig`) reaches the default branch and produces this error. Note the message has a typo ('unknow') but the meaning is an unsupported parameter type.

Source

Thrown at internal/sources/bigtable/bigtable.go:142

func (s *Source) InstanceID() string {
	return s.Instance
}

func getBigtableType(paramType string) (bigtable.SQLType, error) {
	switch paramType {
	case "boolean":
		return bigtable.BoolSQLType{}, nil
	case "string":
		return bigtable.StringSQLType{}, nil
	case "integer":
		return bigtable.Int64SQLType{}, nil
	case "float":
		return bigtable.Float64SQLType{}, nil
	case "array":
		return bigtable.ArraySQLType{}, nil
	default:
		return nil, fmt.Errorf("unknow param type %s", paramType)
	}
}

func getMapParamsType(tparams parameters.Parameters) (map[string]bigtable.SQLType, error) {
	btParamTypes := make(map[string]bigtable.SQLType)
	for _, p := range tparams {
		if p.GetType() == "array" {
			itemType, err := getBigtableType(p.Manifest().Items.Type)
			if err != nil {
				return nil, err
			}
			btParamTypes[p.GetName()] = bigtable.ArraySQLType{
				ElemType: itemType,
			}
			continue
		}
		paramType, err := getBigtableType(p.GetType())
		if err != nil {

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Change the parameter type in the tool config to one of: boolean, string, integer, float, array
  2. For an array parameter, ensure `items.type` is also one of the five supported types
  3. Remove or restructure parameters that don't map (e.g. split an object param into scalar params)
  4. Check for typos in the type field of tools.yaml

Example fix

// before
parameters:
  - name: user_id
    type: number
// after
parameters:
  - name: user_id
    type: integer
Defensive patterns

Strategy: validation

Validate before calling

var allowed = map[string]bool{"boolean": true, "string": true, "integer": true, "float": true, "array": true}
func validateParamTypes(params []map[string]any) error {
	for _, p := range params {
		t, _ := p["type"].(string)
		if !allowed[t] {
			return fmt.Errorf("param %v has unsupported bigtable type %q", p["name"], t)
		}
		if t == "array" {
			items, _ := p["items"].(map[string]any)
			it, _ := items["type"].(string)
			if !allowed[it] {
				return fmt.Errorf("array param %v has unsupported items type %q", p["name"], it)
			}
		}
	}
	return nil
}

Type guard

func isSupportedBigtableType(t string) bool {
	return t == "boolean" || t == "string" || t == "integer" || t == "float" || t == "array"
}

Try / catch

out, err := source.RunSQL(ctx, stmt, params, values)
if err != nil {
	if strings.Contains(err.Error(), "unknow param type") {
		// fix the tool config: unsupported parameter type
	}
	return err
}

Prevention

When it happens

Trigger: A tool's `parameters` include a param whose `type` (or an array param's `items.type`) is not one of boolean/string/integer/float/array; getMapParamsType iterates the params and calls getBigtableType, hitting the default case.

Common situations: Declaring a tool parameter as `object` or `map` against a Bigtable source; typo in the type name in tools.yaml; array param with an unsupported `items.type`; running a SQL-oriented tool config against Bigtable where types like `integer` are fine but others are not.

Related errors


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