googleapis/mcp-toolbox · error
unsupported tool parameter type for BigQuery: %s
Error message
unsupported tool parameter type for BigQuery: %s
What it means
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.
Source
Thrown at internal/tools/bigquery/bigquerycommon/util.go:101
}
return insertResponse, nil
}
// BQTypeStringFromToolType converts a tool parameter type string to a BigQuery standard SQL type string.
func BQTypeStringFromToolType(toolType string) (string, error) {
switch toolType {
case parameters.TypeString:
return "STRING", nil
case parameters.TypeInt:
return "INT64", nil
case parameters.TypeFloat:
return "FLOAT64", nil
case parameters.TypeBool:
return "BOOL", nil
case parameters.TypeMap:
return "STRUCT", nil
default:
return "", fmt.Errorf("unsupported tool parameter type for BigQuery: %s", toolType)
}
}
// InitializeDatasetParameters generates project and dataset tool parameters based on allowedDatasets.
func InitializeDatasetParameters(
allowedDatasets []string,
defaultProjectID string,
projectKey, datasetKey string,
projectDescription, datasetDescription string,
) (projectParam, datasetParam parameters.Parameter) {
if len(allowedDatasets) > 0 {
if len(allowedDatasets) == 1 {
parts := strings.Split(allowedDatasets[0], ".")
defaultProjectID = parts[0]
datasetID := parts[1]
projectDescription += fmt.Sprintf(" Must be `%s`.", defaultProjectID)
datasetDescription += fmt.Sprintf(" Must be `%s`.", datasetID)
datasetParam = parameters.NewStringParameter(datasetKey, datasetDescription, parameters.WithStringDefault(datasetID))View on GitHub (pinned to 8cc6e09de2)
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
Example fix
// before
parameters:
- name: limit
type: int
// after
parameters:
- name: limit
type: integer Defensive patterns
Strategy: validation
Validate before calling
supported := map[string]bool{"string": true, "integer": true, "float": true, "boolean": true, "array": true, "map": true}
for _, p := range toolParams {
if !supported[p.Type] {
return fmt.Errorf("parameter %q has unsupported type %q for BigQuery", p.Name, p.Type)
}
} Try / catch
t, err := BQTypeStringFromToolType(toolType)
if err != nil {
// fall back to STRING or fail fast with a config error
return fmt.Errorf("cannot map parameter type: %w", err)
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- unknow param type %s
- query contains table '%s' without project ID, and no default
- description is required for tool %q
- invalid source for %q tool: source %q is not a compatible ty
- description is required for tool %q
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/99e23b1f800fbd10.
Report an issue: GitHub.