{"record":{"id":"9083556066090f74","repo":"googleapis/mcp-toolbox","slug":"source-is-not-compatible-with-the-tool-908355","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/bigtablegettable/bigtablegettable.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.GetTable(ctx, paramsMap[\"table_id\"].(string))\n\tif err != nil {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/bigtable/bigtablegettable/bigtablegettable.go#L76-L112","documentation":"The bigtable-get-table tool returns this error from ValidateSource when its compatibleSource type assertion fails, meaning the source does not provide the required GetTable(context.Context, string) (any, error) behavior. The toolbox performs this check before every invocation to guarantee the tool can talk to the source. It signals a source/tool wiring mismatch rather than a runtime Bigtable error.","triggerScenarios":"ValidateSource called with, or server invocation receiving, a non-Bigtable source such as postgres/mysql/bigquery, or a source implementation missing the GetTable method for this toolbox version.","commonSituations":"Wrong 'source:' value under the tool in tools.yaml; a custom Source whose methods don't match the current interface; skipping across toolbox versions where interfaces changed.","solutions":["Point the tool at a source with kind: bigtable in the config","Verify the source's concrete type implements the expected GetTable method","Pin/upgrade toolbox and source to matching versions","Run config validation on startup to catch incompatible pairings early"],"exampleFix":"// before\nsource: my-mysql-source\n// after\nsource: my-bigtable-source","handlingStrategy":"validation","validationCode":"if err := tool.ValidateSource(mySource); err != nil {\n    return fmt.Errorf(\"bigtable-get-table needs a bigtable source: %w\", err)\n}","typeGuard":"func isBigtableTableSource(s sources.Source) bool {\n    _, ok := s.(interface{ GetTable(context.Context, string) (any, error) })\n    return ok\n}","tryCatchPattern":"if err := tool.ValidateSource(src); err != nil {\n    log.Fatalf(\"wrong source kind for bigtable-get-table: %v\", err)\n}","preventionTips":["Bind bigtable-get-table only to a bigtable-kind source","Run config validation before serving traffic","Review source renames/refactors for stale tool bindings","Pin versions to avoid interface drift"],"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"}