googleapis/mcp-toolbox · error
source is not compatible with the tool
Error message
source is not compatible with the tool
What it means
bigtable-get-materialized-view's ValidateSource throws this when the provided source fails the type assertion against its compatibleSource interface (a GetMaterializedView(context.Context, string) (any, error) provider). The check exists because the tool depends on Bigtable-admin-specific functionality that only the Bigtable source implements. Any other source kind, or a stale source implementation, triggers it.
Source
Thrown at internal/tools/bigtable/bigtablegetmaterializedview/bigtablegetmaterializedview.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.GetMaterializedView(ctx, paramsMap["instance_id"].(string), paramsMap["materialized_view_id"].(string))
if err != nil {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Set the tool's source field to a bigtable-kind source
- Ensure the source implements GetMaterializedView(context.Context, string) (any, error)
- Sync toolbox and source versions; rebuild the binary
- Validate the merged config at startup before serving requests
Example fix
// before
tools:
get-mv:
kind: bigtable-get-materialized-view
source: postgres-prod
// after
tools:
get-mv:
kind: bigtable-get-materialized-view
source: bigtable-prod Defensive patterns
Strategy: validation
Validate before calling
if err := tool.ValidateSource(src); err != nil {
return fmt.Errorf("bigtable-get-materialized-view requires a bigtable source: %w", err)
} Type guard
func isBigtableMVSource(s sources.Source) bool {
_, ok := s.(interface{ GetMaterializedView(context.Context, string) (any, error) })
return ok
} Try / catch
if err := tool.ValidateSource(src); err != nil {
log.Fatalf("incompatible source for bigtable-get-materialized-view: %v", err)
} Prevention
- Only pair bigtable admin tools with kind: bigtable sources
- Add a CI lint that checks tool kind vs source kind
- Keep custom sources' method sets aligned with the toolbox version
- Test tool registration locally before deploying
When it happens
Trigger: Calling ValidateSource or invoking the tool with a source that is not the Bigtable source, e.g. a SQL database source, or a Bigtable source build lacking the GetMaterializedView method.
Common situations: Miswired tools.yaml (tool referencing another engine's source); copy-paste of tool blocks without updating the source field; upgrading toolbox so a custom source no longer satisfies the interface.
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/7e26381141966b34.
Report an issue: GitHub.