googleapis/mcp-toolbox · error
filter field cannot be empty
Error message
filter field cannot be empty
What it means
Filter-validation guard in FilterConfig.Validate: a filter object from the filters parameter parsed successfully but its `field` member is missing or empty, so there is nothing to filter on.
Source
Thrown at internal/tools/firestore/firestorequerycollection/firestorequerycollection.go:209
// validate interface
var _ tools.Tool = Tool{}
// Tool represents the Firestore query collection tool
type Tool struct {
tools.BaseTool[Config]
}
// 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 configurationView on GitHub (pinned to 8cc6e09de2)
Solutions
- Include a non-empty `field` in every filter JSON object
- Remove malformed filter entries from the filters array
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/tools/firestore/firestorequerycollection/firestorequerycollection.go:209 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/4554a6b0ac5af042.
Report an issue: GitHub.