{"record":{"id":"fb7b212aa92287d6","repo":"googleapis/mcp-toolbox","slug":"source-is-not-compatible-with-the-tool-fb7b21","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/bigtablelistschemas/bigtablelistschemas.go","lineNumber":102,"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\ntype TableSchema struct {\n\tTableName string              `json:\"table_name\"`\n\tInfo      *bigtable.TableInfo `json:\"info,omitempty\"`\n}\n\ntype Column struct {\n\tName string `json:\"name\"`\n\tType string `json:\"type,omitempty\"`\n}\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/bigtable/bigtablelistschemas/bigtablelistschemas.go#L84-L120","documentation":"bigtable-list-schemas' ValidateSource emits this error when the provided source fails its compatibleSource type assertion, meaning it cannot enumerate Bigtable schemas/views/tables. Only the Bigtable source satisfies the interface; any other source kind is rejected before invocation. This guards the tool from being paired with an engine that cannot serve its operations.","triggerScenarios":"Calling ValidateSource or invoking the tool with a source such as postgres/mysql/spanner, or an incompatible custom/older Bigtable source missing the required methods.","commonSituations":"Wrong 'source:' field in the tool block; source kind changed during migration; version skew between the toolbox binary and the checked-out config.","solutions":["Point bigtable-list-schemas at a source declared with kind: bigtable","Ensure the source implements the tool's compatibleSource method set","Rebuild/redeploy with aligned toolbox and config versions","Add startup or CI-time validation of tool-source compatibility"],"exampleFix":"// before\nkind: bigtable-list-schemas\nsource: mysql-src\n// after\nkind: bigtable-list-schemas\nsource: bigtable-src","handlingStrategy":"validation","validationCode":"if err := tool.ValidateSource(src); err != nil {\n    return fmt.Errorf(\"bigtable-list-schemas requires a bigtable source: %w\", err)\n}","typeGuard":"func isBigtableSchemaSource(s sources.Source) bool {\n    _, ok := s.(interface {\n        ListTables(context.Context, string) (any, error)\n        ListViews(context.Context) (any, error)\n    })\n    return ok\n}","tryCatchPattern":"if err := tool.ValidateSource(src); err != nil {\n    log.Fatalf(\"incompatible source for bigtable-list-schemas: %v\", err)\n}","preventionTips":["Only bind schema tools to kind: bigtable sources","Add startup validation so mismatches fail fast","Review tool blocks copied from other engines for stale source refs","Pin toolbox versions in deployment manifests"],"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-08T15:18:49.778Z"}