{"record":{"id":"6e1d1b40e550a278","repo":"googleapis/mcp-toolbox","slug":"source-is-not-compatible-with-the-tool-6e1d1b","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/bigtableupdatetable/bigtableupdatetable.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.UpdateTable(ctx, paramsMap[\"table_id\"].(string), paramsMap[\"disable_change_stream\"].(bool))\n\tif err != nil {","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/bigtable/bigtableupdatetable/bigtableupdatetable.go#L77-L113","documentation":"Thrown by the bigtableupdatetable Tool.ValidateSource when the supplied sources.Source does not implement the tool's compatibleSource interface. The table-update operation is rejected before any API call.","triggerScenarios":"ValidateSource/Invoke receives a source failing the type assertion to bigtableupdatetable's compatibleSource — the tool is wired to an incompatible source in tools.yaml or in code.","commonSituations":"Config mistake where the update-table tool references a non-Bigtable source; copy-pasted tool blocks; renamed sources not propagated to tools.","solutions":["Set the tool's source field to a compatible bigtable source","Confirm the source is initialized as a Bigtable source","Restart the toolbox so the corrected pairing takes effect","Pass the right concrete Source type when calling Invoke directly"],"exampleFix":"// before (tools.yaml)\ntools:\n  update-table:\n    kind: bigtable-update-table\n    source: my-sql-server\n// after\ntools:\n  update-table:\n    kind: bigtable-update-table\n    source: my-bigtable-instance","handlingStrategy":"type-guard","validationCode":"// Confirm compatibility before invoking the table-update tool\nif err := tool.ValidateSource(mySource); err != nil {\n    return fmt.Errorf(\"source %s is not compatible with bigtable-update-table\", sourceName)\n}","typeGuard":"func isCompatibleUpdateTableSource(s sources.Source) bool {\n    _, ok := s.(bigtableupdatetable.CompatibleSource)\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Reference bigtable sources for bigtable-update-table","Validate the config at startup so mismatches fail fast","Track source renames with grep across tools.yaml","Keep per-kind source naming conventions to reduce wiring mistakes"],"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"}