googleapis/mcp-toolbox · error
unsupported operator: %s. Valid operators are: %v
Error message
unsupported operator: %s. Valid operators are: %v
What it means
Filter-validation guard in FilterConfig.Validate: the filter's `op` is not one of the supported Firestore query operators (==, <, <=, >, >=, !=, in, array-contains, array-contains-any); the message lists the accepted set.
Source
Thrown at internal/tools/firestore/firestorequerycollection/firestorequerycollection.go:217
// FilterConfig represents a filter for the query
type FilterConfig struct {
Field string `json:"field"`
Op string `json:"op"`
Value interface{} `json:"value"`
}
// Validate checks if the filter configuration is valid
func (f *FilterConfig) Validate() error {
if f.Field == "" {
return fmt.Errorf("filter field cannot be empty")
}
if !validOperators[f.Op] {
ops := make([]string, 0, len(validOperators))
for op := range validOperators {
ops = append(ops, op)
}
return fmt.Errorf(errInvalidOperator, f.Op, ops)
}
if f.Value == nil {
return fmt.Errorf(errMissingFilterValue, f.Field)
}
return nil
}
// OrderByConfig represents ordering configuration
type OrderByConfig struct {
Field string `json:"field"`
Direction string `json:"direction"`
}
// GetDirection returns the Firestore direction constant
func (o *OrderByConfig) GetDirection() firestoreapi.Direction {
if strings.EqualFold(o.Direction, "DESCENDING") {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Use one of the operators listed in the error message
- Check for typos such as 'equals' instead of '=='
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/tools/firestore/firestorequerycollection/firestorequerycollection.go:217 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/6e27fb96eea5ad1b.
Report an issue: GitHub.