{"record":{"id":"2aa70054d9391ad5","repo":"googleapis/mcp-toolbox","slug":"source-is-not-compatible-with-the-tool-2aa700","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/bigtablegetlogicalview/bigtablegetlogicalview.go","lineNumber":95,"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.GetLogicalView(ctx, paramsMap[\"instance_id\"].(string), paramsMap[\"logical_view_id\"].(string))\n\tif err != nil {","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/bigtable/bigtablegetlogicalview/bigtablegetlogicalview.go#L77-L113","documentation":"The bigtable-get-logical-view tool's ValidateSource returns this error when the supplied sources.Source cannot be asserted to its compatibleSource interface, which requires a GetLogicalView(context.Context, string) (any, error) method. The toolbox resolves sources dynamically, so only the genuine Bigtable source satisfies the assertion. This indicates the tool was wired to an incompatible source, not a Bigtable data problem.","triggerScenarios":"ValidateSource is called, or the tool is invoked via the MCP/API server, with a non-Bigtable source (e.g. postgres, spanner) or a source missing the GetLogicalView method required by this tool version.","commonSituations":"Wrong source name in the tool's yaml config; a source defined with the wrong kind; mixing a custom source implementation with a prebuilt bigtable tool; version skew between toolbox releases changing source interfaces.","solutions":["Bind the tool to a source with kind: bigtable in tools.yaml","Confirm the source type implements the tool's expected method (GetLogicalView) for your toolbox version","Regenerate or fix the config; restart the server so sources re-register","Add a startup config validation step to fail fast on mismatched tool/source pairs"],"exampleFix":"// before (tools.yaml)\nsource: my-alloydb-source\n// after\nsource: my-bigtable-source","handlingStrategy":"validation","validationCode":"if err := tool.ValidateSource(mySource); err != nil {\n    return fmt.Errorf(\"bigtable-get-logical-view requires a bigtable source: %w\", err)\n}","typeGuard":"func isBigtableLogicalViewSource(s sources.Source) bool {\n    _, ok := s.(interface{ GetLogicalView(context.Context, string) (any, error) })\n    return ok\n}","tryCatchPattern":"if err := tool.ValidateSource(src); err != nil {\n    log.Fatalf(\"wrong source for bigtable-get-logical-view: %v\", err)\n}","preventionTips":["Verify the 'source:' key under each tool points at a bigtable source","Validate merged configs at startup","Avoid mixing prebuilt bigtable tools with custom non-bigtable sources","Re-check tool/source bindings after toolbox upgrades"],"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"}