{"record":{"id":"b7dc53fd2bc176d9","repo":"googleapis/mcp-toolbox","slug":"source-is-not-compatible-with-the-tool-b7dc53","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/bigtableupdatelogicalview/bigtableupdatelogicalview.go","lineNumber":96,"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.UpdateLogicalView(ctx, paramsMap[\"instance_id\"].(string), paramsMap[\"logical_view_id\"].(string), paramsMap[\"query\"].(string))\n\tif err != nil {","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/bigtable/bigtableupdatelogicalview/bigtableupdatelogicalview.go#L78-L114","documentation":"Thrown by the bigtableupdatelogicalview Tool.ValidateSource when the supplied source does not implement the tool's compatibleSource interface. The logical-view update is rejected before contacting the Bigtable admin API.","triggerScenarios":"ValidateSource/Invoke receives a source failing the type assertion to bigtableupdatelogicalview's compatibleSource — the tool is attached to a non-Bigtable or otherwise incompatible source.","commonSituations":"Misconfigured tools.yaml where source points at the wrong source kind; duplicated tool blocks for different sources; programmatic tool construction with a mismatched Source.","solutions":["Set the tool's source to a compatible bigtable source in tools.yaml","Confirm the source initializes as a Bigtable source","Restart the toolbox to reload configuration","Pass the correct concrete Source type satisfying compatibleSource in code"],"exampleFix":"// before (tools.yaml)\ntools:\n  update-logical-view:\n    kind: bigtable-update-logical-view\n    source: my-alloydb\n// after\ntools:\n  update-logical-view:\n    kind: bigtable-update-logical-view\n    source: my-bigtable-instance","handlingStrategy":"type-guard","validationCode":"// Check compatibility before invoking the logical-view update\nif err := tool.ValidateSource(mySource); err != nil {\n    return fmt.Errorf(\"source %s is not usable by bigtable-update-logical-view\", sourceName)\n}","typeGuard":"func isCompatibleLogicalViewSource(s sources.Source) bool {\n    _, ok := s.(bigtableupdatelogicalview.CompatibleSource)\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Attach bigtable-update-logical-view only to Bigtable sources","Validate source-tool pairs at server startup","Grep tools.yaml for the tool's source reference after renames","Keep admin/mutation tools separated per source kind in config"],"tags":["go","config","type-mismatch","bigtable"],"backgroundTag":"incompatible-source-type","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"}