googleapis/mcp-toolbox · error
invalid collection path: %w
Error message
invalid collection path: %w
What it means
Wrap of ValidateCollectionPath in parseQueryParameters: the supplied collection path failed structural validation (absolute path, wrong segment parity, empty or reserved segments, etc.). The wrapped error names the precise rule.
Source
Thrown at internal/tools/firestore/firestorequerycollection/firestorequerycollection.go:311
Filters []FilterConfig
OrderBy *OrderByConfig
Limit int
AnalyzeQuery bool
}
// parseQueryParameters extracts and validates parameters from the input
func (t Tool) parseQueryParameters(params parameters.ParamValues) (*queryParameters, error) {
mapParams := params.AsMap()
// Get collection path
collectionPath, ok := mapParams[collectionPathKey].(string)
if !ok || collectionPath == "" {
return nil, fmt.Errorf(errMissingCollectionPath, collectionPathKey)
}
// Validate collection path
if err := fsUtil.ValidateCollectionPath(collectionPath); err != nil {
return nil, fmt.Errorf("invalid collection path: %w", err)
}
result := &queryParameters{
CollectionPath: collectionPath,
Limit: defaultLimit,
AnalyzeQuery: defaultAnalyze,
}
// Parse filters
if filtersRaw, ok := mapParams[filtersKey]; ok && filtersRaw != nil {
filters, err := t.parseFilters(filtersRaw)
if err != nil {
return nil, err
}
result.Filters = filters
}
// Parse orderByView on GitHub (pinned to 8cc6e09de2)
Solutions
- Use a relative path with an odd number of slash-separated segments, e.g. 'users' or 'users/alice/tasks'
- Do not prefix the path with projects/.../documents/
- Avoid empty, whitespace-only, '.', '..' or '__'-prefixed segments
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/tools/firestore/firestorequerycollection/firestorequerycollection.go:311 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/36d954ba1934a0cd.
Report an issue: GitHub.