{"record":{"id":"ab3f3bbfc6bf5f75","repo":"googleapis/mcp-toolbox","slug":"invalid-source-for-q-tool-source-q-is-not-a-com-ab3f3b","errorCode":null,"errorMessage":"invalid source for %q tool: source %q is not a compatible type","messagePattern":"invalid source for %q tool: source %q is not a compatible type","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/firestore/firestorequerycollection/firestorequerycollection.go","lineNumber":143,"sourceCode":"\t\t\ttools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),\n\t\t\ttools.Manifest{Description: cfg.Description, Parameters: params.Manifest(), AuthRequired: cfg.AuthRequired},\n\t\t\tparams,\n\t\t),\n\t}, nil\n}\n\nfunc (t Tool) GetSourceName() string {\n\treturn t.Cfg.Source\n}\n\nfunc (t Tool) ToConfig() tools.ToolConfig {\n\treturn t.Cfg\n}\n\nfunc (t Tool) ValidateSource(source sources.Source) error {\n\t_, ok := source.(compatibleSource)\n\tif !ok {\n\t\treturn fmt.Errorf(\"invalid source for %q tool: source %q is not a compatible type\", t.Cfg.Type, t.Cfg.Source)\n\t}\n\treturn nil\n}\n\n// createParameters creates the parameter definitions for the tool\nfunc createParameters() parameters.Parameters {\n\tcollectionPathParameter := parameters.NewStringParameter(\n\t\tcollectionPathKey,\n\t\t\"The relative path to the Firestore collection to query (e.g., 'users' or 'users/userId/posts'). Note: This is a relative path, NOT an absolute path like 'projects/{project_id}/databases/{database_id}/documents/...'\",\n\t)\n\n\tfiltersDescription := `Array of filter objects to apply to the query. Each filter is a JSON string with:\n- field: The field name to filter on\n- op: The operator to use (\"<\", \"<=\", \">\", \">=\", \"==\", \"!=\", \"array-contains\", \"array-contains-any\", \"in\", \"not-in\")\n- value: The value to compare against (can be string, number, boolean, or array)\nExample: {\"field\": \"age\", \"op\": \">\", \"value\": 18}`\n\n\tfiltersParameter := parameters.NewArrayParameter(","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/firestore/firestorequerycollection/firestorequerycollection.go#L125-L161","documentation":"Source-compatibility check in ValidateSource: the configured source does not implement the Firestore compatibleSource interface required by the query-collection tool, so it cannot run Firestore collection queries.","triggerScenarios":"Thrown at internal/tools/firestore/firestorequerycollection/firestorequerycollection.go:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the tool's source field at a firestore source instance","Verify the source kind in tools.yaml matches the Firestore source"],"exampleFix":null,"handlingStrategy":"type-guard","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"}