{"record":{"id":"b62619bc263c3085","repo":"googleapis/mcp-toolbox","slug":"too-many-filters-provided-d-maximum-d","errorCode":null,"errorMessage":"too many filters provided: %d (maximum: %d)","messagePattern":"too many filters provided: (.+?) \\(maximum: (.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/firestore/firestorequerycollection/firestorequerycollection.go","lineNumber":359,"sourceCode":"\t}\n\n\t// Parse analyze\n\tif analyze, ok := mapParams[analyzeQueryKey].(bool); ok {\n\t\tresult.AnalyzeQuery = analyze\n\t}\n\n\treturn result, nil\n}\n\n// parseFilters parses and validates filter configurations\nfunc (t Tool) parseFilters(filtersRaw interface{}) ([]FilterConfig, error) {\n\tfilters, ok := filtersRaw.([]any)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(errInvalidFilters, filtersKey)\n\t}\n\n\tif len(filters) > maxFilterLength {\n\t\treturn nil, fmt.Errorf(errTooManyFilters, len(filters), maxFilterLength)\n\t}\n\n\tresult := make([]FilterConfig, 0, len(filters))\n\tfor i, filterRaw := range filters {\n\t\tfilterJSON, ok := filterRaw.(string)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(errFilterNotString, i)\n\t\t}\n\n\t\tvar filter FilterConfig\n\t\tif err := json.Unmarshal([]byte(filterJSON), &filter); err != nil {\n\t\t\treturn nil, fmt.Errorf(errFilterParseFailed, i, err)\n\t\t}\n\n\t\tif err := filter.Validate(); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"filter at index %d is invalid: %w\", i, err)\n\t\t}\n","sourceCodeStart":341,"sourceCodeEnd":377,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/firestore/firestorequerycollection/firestorequerycollection.go#L341-L377","documentation":"Capacity guard in parseFilters: more filter entries were supplied than maxFilterLength allows, protecting the Firestore query from an unbounded WHERE clause.","triggerScenarios":"Thrown at internal/tools/firestore/firestorequerycollection/firestorequerycollection.go:359 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Reduce the filters array to at most the maximum count stated in the error","Split the query into multiple invocations or narrow the collection path instead"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}