{"record":{"id":"fc8eba96d1f66a9e","repo":"googleapis/mcp-toolbox","slug":"source-is-not-compatible-with-the-tool-fc8eba","errorCode":null,"errorMessage":"source is not compatible with the tool","messagePattern":"source is not compatible with the tool","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/bigtable/bigtablelistlogicalviews/bigtablelistlogicalviews.go","lineNumber":94,"sourceCode":"\t\t\tallParameters,\n\t\t),\n\t}, nil\n}\n\nvar _ tools.Tool = Tool{}\n\ntype Tool struct {\n\ttools.BaseTool[Config]\n}\n\nfunc (t Tool) GetSourceName() string {\n\treturn t.Cfg.Source\n}\n\nfunc (t Tool) ValidateSource(src sources.Source) error {\n\t_, ok := src.(compatibleSource)\n\tif !ok {\n\t\treturn fmt.Errorf(\"source is not compatible with the tool\")\n\t}\n\treturn nil\n}\n\nfunc (t Tool) ToConfig() tools.ToolConfig {\n\treturn t.Cfg\n}\n\nfunc (t Tool) Invoke(ctx context.Context, src sources.Source, params parameters.ParamValues, accessToken tools.AccessToken) (any, util.ToolboxError) {\n\tsource, ok := src.(compatibleSource)\n\tif !ok {\n\t\treturn nil, util.NewClientServerError(\"source used is not compatible with the tool\", http.StatusInternalServerError, nil)\n\t}\n\n\tparamsMap := params.AsMap()\n\n\tres, err := source.ListLogicalViews(ctx, paramsMap[\"instance_id\"].(string))\n\tif err != nil {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/bigtable/bigtablelistlogicalviews/bigtablelistlogicalviews.go#L76-L112","documentation":"bigtable-list-logical-views' ValidateSource throws this when its compatibleSource assertion fails, i.e. the supplied source cannot supply logical-view listings for Bigtable. Only the concrete Bigtable source implements the needed method; any other source kind fails the check. The error surfaces before any admin API request is made.","triggerScenarios":"Calling ValidateSource or running the tool with a source that is not the Bigtable source, or a source whose method set no longer matches this toolbox version's interface.","commonSituations":"Tool bound to the wrong source in tools.yaml; refactoring renamed/replaced the source; custom source implementations not updated after a toolbox release.","solutions":["Point the tool at a source with kind: bigtable","Confirm the source type implements the list-logical-views method","Rebuild/redeploy with matching toolbox and config versions","Lint tool-source pairings in CI to catch kind mismatches"],"exampleFix":"// before\nsource: my-postgres-source\n// after\nsource: my-bigtable-source","handlingStrategy":"validation","validationCode":"if err := tool.ValidateSource(src); err != nil {\n    return fmt.Errorf(\"bigtable-list-logical-views requires a bigtable source: %w\", err)\n}","typeGuard":"func isBigtableLogicalViewsSource(s sources.Source) bool {\n    _, ok := s.(interface{ ListLogicalViews(context.Context) (any, error) })\n    return ok\n}","tryCatchPattern":"if err := tool.ValidateSource(src); err != nil {\n    log.Fatalf(\"incompatible source for bigtable-list-logical-views: %v\", err)\n}","preventionTips":["Pair logical-view tools only with bigtable-kind sources","Run a config linter that maps tool kinds to source kinds","Test locally with the same tools.yaml used in deployment","Re-check bindings after source refactors"],"tags":["go","bigtable","source-compatibility","configuration"],"backgroundTag":"source-not-compatible-with-tool","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"}