{"record":{"id":"99e23b1f800fbd10","repo":"googleapis/mcp-toolbox","slug":"unsupported-tool-parameter-type-for-bigquery-s","errorCode":null,"errorMessage":"unsupported tool parameter type for BigQuery: %s","messagePattern":"unsupported tool parameter type for BigQuery: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/bigquery/bigquerycommon/util.go","lineNumber":101,"sourceCode":"\t}\n\treturn insertResponse, nil\n}\n\n// BQTypeStringFromToolType converts a tool parameter type string to a BigQuery standard SQL type string.\nfunc BQTypeStringFromToolType(toolType string) (string, error) {\n\tswitch toolType {\n\tcase parameters.TypeString:\n\t\treturn \"STRING\", nil\n\tcase parameters.TypeInt:\n\t\treturn \"INT64\", nil\n\tcase parameters.TypeFloat:\n\t\treturn \"FLOAT64\", nil\n\tcase parameters.TypeBool:\n\t\treturn \"BOOL\", nil\n\tcase parameters.TypeMap:\n\t\treturn \"STRUCT\", nil\n\tdefault:\n\t\treturn \"\", fmt.Errorf(\"unsupported tool parameter type for BigQuery: %s\", toolType)\n\t}\n}\n\n// InitializeDatasetParameters generates project and dataset tool parameters based on allowedDatasets.\nfunc InitializeDatasetParameters(\n\tallowedDatasets []string,\n\tdefaultProjectID string,\n\tprojectKey, datasetKey string,\n\tprojectDescription, datasetDescription string,\n) (projectParam, datasetParam parameters.Parameter) {\n\tif len(allowedDatasets) > 0 {\n\t\tif len(allowedDatasets) == 1 {\n\t\t\tparts := strings.Split(allowedDatasets[0], \".\")\n\t\t\tdefaultProjectID = parts[0]\n\t\t\tdatasetID := parts[1]\n\t\t\tprojectDescription += fmt.Sprintf(\" Must be `%s`.\", defaultProjectID)\n\t\t\tdatasetDescription += fmt.Sprintf(\" Must be `%s`.\", datasetID)\n\t\t\tdatasetParam = parameters.NewStringParameter(datasetKey, datasetDescription, parameters.WithStringDefault(datasetID))","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/bigquery/bigquerycommon/util.go#L83-L119","documentation":"BQTypeStringFromToolType maps MCP toolbox parameter types (string, integer, float, boolean, map, array...) to BigQuery SQL type names. Any type outside the supported set hits the default branch and returns this error, since a corresponding BigQuery scalar type cannot be chosen.","triggerScenarios":"Declaring a tool parameter with a type value not in the supported list (e.g. a custom/typo'd type like \"strings\", \"int\", \"object\") and invoking the query-building path that calls BQTypeStringFromToolType.","commonSituations":"Typo in a YAML tool config's type field; using a newly-added toolbox type with an older mapping; passing parameters.TypeX constants not covered by the switch; schema drift after upgrading the toolbox library.","solutions":["Change the tool parameter type in the config to a supported value (string, integer, float, bool, map/array as mapped)","Check the parameters package constants and use the exact accepted names","Add a case to BQTypeStringFromToolType if a genuinely new type must be supported (upstream change)","Validate tool configs at startup so bad types fail fast with a clear message"],"exampleFix":"// before\nparameters:\n  - name: limit\n    type: int\n// after\nparameters:\n  - name: limit\n    type: integer","handlingStrategy":"validation","validationCode":"supported := map[string]bool{\"string\": true, \"integer\": true, \"float\": true, \"boolean\": true, \"array\": true, \"map\": true}\nfor _, p := range toolParams {\n    if !supported[p.Type] {\n        return fmt.Errorf(\"parameter %q has unsupported type %q for BigQuery\", p.Name, p.Type)\n    }\n}","typeGuard":null,"tryCatchPattern":"t, err := BQTypeStringFromToolType(toolType)\nif err != nil {\n    // fall back to STRING or fail fast with a config error\n    return fmt.Errorf(\"cannot map parameter type: %w\", err)\n}","preventionTips":["Use only documented parameter type names in tool configs","Validate tool YAML schemas at startup","Keep toolbox library and configs in sync when upgrading types"],"tags":["bigquery","parameter-types","configuration","type-mapping"],"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"}