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-list-materialized-views tool returns this error from ValidateSource when the passed source does not implement its private compatibleSource interface (materialized-view listing on the Bigtable source). The toolbox asserts the concrete source type per tool, so any foreign source fails. It is a pre-invocation wiring check, not a Bigtable service error.
Source
Thrown at internal/tools/bigtable/bigtablelistmaterializedviews/bigtablelistmaterializedviews.go:94
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.ListMaterializedViews(ctx, paramsMap["instance_id"].(string))
if err != nil {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Bind the tool to a bigtable-kind source in tools.yaml
- Verify the source implements the expected method set
- Sync config and toolbox versions; restart the server
- Validate the merged config at boot and in CI
Example fix
// before source: alloydb-src // after source: bigtable-src
Defensive patterns
Strategy: validation
Validate before calling
if err := tool.ValidateSource(mySource); err != nil {
return fmt.Errorf("bigtable-list-materialized-views needs a bigtable source: %w", err)
} Type guard
func isBigtableMaterializedViewsSource(s sources.Source) bool {
_, ok := s.(interface{ ListMaterializedViews(context.Context) (any, error) })
return ok
} Try / catch
if err := tool.ValidateSource(src); err != nil {
log.Fatalf("wrong source kind for bigtable-list-materialized-views: %v", err)
} Prevention
- Ensure tool source fields point at bigtable sources
- Validate configs in CI and at boot
- Keep environment-specific configs derived from one source of truth
- Update custom sources when upgrading the toolbox
When it happens
Trigger: ValidateSource is called or the tool invoked with a non-Bigtable source (SQL/warehouse sources), or a Bigtable source build lacking the required method for this version.
Common situations: Copy-pasted tool configs pointing at another engine's source; environment-specific configs diverging; toolbox upgrades changing internal 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/6d802558d55e47cb.
Report an issue: GitHub.