{"record":{"id":"e52e79b2996e4001","repo":"googleapis/mcp-toolbox","slug":"unknow-param-type-s","errorCode":null,"errorMessage":"unknow param type %s","messagePattern":"unknow param type (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/sources/bigtable/bigtable.go","lineNumber":142,"sourceCode":"\nfunc (s *Source) InstanceID() string {\n\treturn s.Instance\n}\n\nfunc getBigtableType(paramType string) (bigtable.SQLType, error) {\n\tswitch paramType {\n\tcase \"boolean\":\n\t\treturn bigtable.BoolSQLType{}, nil\n\tcase \"string\":\n\t\treturn bigtable.StringSQLType{}, nil\n\tcase \"integer\":\n\t\treturn bigtable.Int64SQLType{}, nil\n\tcase \"float\":\n\t\treturn bigtable.Float64SQLType{}, nil\n\tcase \"array\":\n\t\treturn bigtable.ArraySQLType{}, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknow param type %s\", paramType)\n\t}\n}\n\nfunc getMapParamsType(tparams parameters.Parameters) (map[string]bigtable.SQLType, error) {\n\tbtParamTypes := make(map[string]bigtable.SQLType)\n\tfor _, p := range tparams {\n\t\tif p.GetType() == \"array\" {\n\t\t\titemType, err := getBigtableType(p.Manifest().Items.Type)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tbtParamTypes[p.GetName()] = bigtable.ArraySQLType{\n\t\t\t\tElemType: itemType,\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\t\tparamType, err := getBigtableType(p.GetType())\n\t\tif err != nil {","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/sources/bigtable/bigtable.go#L124-L160","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Change the parameter type in the tool config to one of: boolean, string, integer, float, array","For an array parameter, ensure `items.type` is also one of the five supported types","Remove or restructure parameters that don't map (e.g. split an object param into scalar params)","Check for typos in the type field of tools.yaml"],"exampleFix":"// before\nparameters:\n  - name: user_id\n    type: number\n// after\nparameters:\n  - name: user_id\n    type: integer","handlingStrategy":"validation","validationCode":"var allowed = map[string]bool{\"boolean\": true, \"string\": true, \"integer\": true, \"float\": true, \"array\": true}\nfunc validateParamTypes(params []map[string]any) error {\n\tfor _, p := range params {\n\t\tt, _ := p[\"type\"].(string)\n\t\tif !allowed[t] {\n\t\t\treturn fmt.Errorf(\"param %v has unsupported bigtable type %q\", p[\"name\"], t)\n\t\t}\n\t\tif t == \"array\" {\n\t\t\titems, _ := p[\"items\"].(map[string]any)\n\t\t\tit, _ := items[\"type\"].(string)\n\t\t\tif !allowed[it] {\n\t\t\t\treturn fmt.Errorf(\"array param %v has unsupported items type %q\", p[\"name\"], it)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}","typeGuard":"func isSupportedBigtableType(t string) bool {\n\treturn t == \"boolean\" || t == \"string\" || t == \"integer\" || t == \"float\" || t == \"array\"\n}","tryCatchPattern":"out, err := source.RunSQL(ctx, stmt, params, values)\nif err != nil {\n\tif strings.Contains(err.Error(), \"unknow param type\") {\n\t\t// fix the tool config: unsupported parameter type\n\t}\n\treturn err\n}","preventionTips":["Only declare boolean/string/integer/float/array parameter types for Bigtable-backed tools","Check array items.type too — it goes through the same mapping","Lint tools.yaml types at CI time before deployment","Replace object/map params with separate scalar params"],"tags":["bigtable","parameters","type-mapping","configuration"],"backgroundTag":"unsupported-parameter-type","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"}