{"record":{"id":"27489c30527cdfb8","repo":"googleapis/mcp-toolbox","slug":"source-is-not-compatible-with-the-tool-27489c","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/bigtablelisttables/bigtablelisttables.go","lineNumber":92,"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\ttables, err := source.ListTables(ctx)\n\tif err != nil {\n\t\treturn nil, util.ProcessGcpError(err)\n\t}","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/bigtable/bigtablelisttables/bigtablelisttables.go#L74-L110","documentation":"The bigtable-list-tables tool's ValidateSource returns this error when its compatibleSource assertion fails: the supplied source cannot list tables in a Bigtable instance. Because the toolbox wires tools to sources by name at runtime, only the concrete Bigtable source passes. The error is returned before any Bigtable API call, indicating a configuration mismatch.","triggerScenarios":"ValidateSource invoked, or the tool executed via the server, with a non-Bigtable source or a source lacking the required ListTables-style method for this toolbox version.","commonSituations":"tools.yaml references the wrong source for the tool; a source was renamed or its kind changed; custom source implementations not updated to the current interface after an upgrade.","solutions":["Bind the tool to a source with kind: bigtable in the config","Verify the source implements the tool's expected method set","Align toolbox and source versions and rebuild the binary","Validate tool-source pairings at startup and in CI"],"exampleFix":"// before\nsource: my-postgres-source\n// after\nsource: my-bigtable-source","handlingStrategy":"validation","validationCode":"if err := tool.ValidateSource(mySource); err != nil {\n    return fmt.Errorf(\"bigtable-list-tables needs a bigtable source: %w\", err)\n}","typeGuard":"func isBigtableListTablesSource(s sources.Source) bool {\n    _, ok := s.(interface{ ListTables(context.Context, string) (any, error) })\n    return ok\n}","tryCatchPattern":"if err := tool.ValidateSource(src); err != nil {\n    log.Fatalf(\"wrong source for bigtable-list-tables: %v\", err)\n}","preventionTips":["Verify each bigtable-* tool references a bigtable source in tools.yaml","Run config validation before deploying","Grep tool blocks for source names when renaming sources","Keep toolbox and configs versioned together"],"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"}