googleapis/mcp-toolbox · error
source is not compatible with the tool
Error message
source is not compatible with the tool
What it means
The bigtable-get-logical-view tool's ValidateSource returns this error when the supplied sources.Source cannot be asserted to its compatibleSource interface, which requires a GetLogicalView(context.Context, string) (any, error) method. The toolbox resolves sources dynamically, so only the genuine Bigtable source satisfies the assertion. This indicates the tool was wired to an incompatible source, not a Bigtable data problem.
Source
Thrown at internal/tools/bigtable/bigtablegetlogicalview/bigtablegetlogicalview.go:95
allParameters,
),
}, nil
}
var _ tools.Tool = Tool{}
type Tool struct {
tools.BaseTool[Config]
}
func (t Tool) GetSourceName() string {
return t.Cfg.Source
}
func (t Tool) ValidateSource(src sources.Source) error {
_, ok := src.(compatibleSource)
if !ok {
return fmt.Errorf("source is not compatible with the tool")
}
return nil
}
func (t Tool) ToConfig() tools.ToolConfig {
return t.Cfg
}
func (t Tool) Invoke(ctx context.Context, src sources.Source, params parameters.ParamValues, accessToken tools.AccessToken) (any, util.ToolboxError) {
source, ok := src.(compatibleSource)
if !ok {
return nil, util.NewClientServerError("source used is not compatible with the tool", http.StatusInternalServerError, nil)
}
paramsMap := params.AsMap()
res, err := source.GetLogicalView(ctx, paramsMap["instance_id"].(string), paramsMap["logical_view_id"].(string))
if err != nil {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Bind the tool to a source with kind: bigtable in tools.yaml
- Confirm the source type implements the tool's expected method (GetLogicalView) for your toolbox version
- Regenerate or fix the config; restart the server so sources re-register
- Add a startup config validation step to fail fast on mismatched tool/source pairs
Example fix
// before (tools.yaml) source: my-alloydb-source // after source: my-bigtable-source
Defensive patterns
Strategy: validation
Validate before calling
if err := tool.ValidateSource(mySource); err != nil {
return fmt.Errorf("bigtable-get-logical-view requires a bigtable source: %w", err)
} Type guard
func isBigtableLogicalViewSource(s sources.Source) bool {
_, ok := s.(interface{ GetLogicalView(context.Context, string) (any, error) })
return ok
} Try / catch
if err := tool.ValidateSource(src); err != nil {
log.Fatalf("wrong source for bigtable-get-logical-view: %v", err)
} Prevention
- Verify the 'source:' key under each tool points at a bigtable source
- Validate merged configs at startup
- Avoid mixing prebuilt bigtable tools with custom non-bigtable sources
- Re-check tool/source bindings after toolbox upgrades
When it happens
Trigger: ValidateSource is called, or the tool is invoked via the MCP/API server, with a non-Bigtable source (e.g. postgres, spanner) or a source missing the GetLogicalView method required by this tool version.
Common situations: Wrong source name in the tool's yaml config; a source defined with the wrong kind; mixing a custom source implementation with a prebuilt bigtable tool; version skew between toolbox releases changing source interfaces.
Related errors
- source is not compatible with the tool
- source is not compatible with the tool
- source is not compatible with the tool
- source is not compatible with the tool
- source is not compatible with the tool
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/2aa70054d9391ad5.
Report an issue: GitHub.