googleapis/mcp-toolbox · error
source is not compatible with the tool
Error message
source is not compatible with the tool
What it means
bigtable-list-clusters' ValidateSource emits this error when the passed source cannot be asserted to compatibleSource (which requires ListClusters(context.Context) (any, error) semantics on the Bigtable source type). Because sources are resolved by name at runtime, any non-Bigtable source bound to this admin tool fails. This is purely a compatibility check ahead of the actual instance-admin call.
Source
Thrown at internal/tools/bigtable/bigtablelistclusters/bigtablelistclusters.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.ListClusters(ctx, paramsMap["instance_id"].(string))
if err != nil {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Bind bigtable-list-clusters to a source declared with kind: bigtable
- Confirm the source implements the tool's compatibleSource method set
- Rebuild config and restart so tool/source registration matches
- Add an automated config-lint step in CI that checks tool-source kinds
Example fix
// before kind: bigtable-list-clusters source: spanner-src // after kind: bigtable-list-clusters source: bigtable-src
Defensive patterns
Strategy: validation
Validate before calling
if err := tool.ValidateSource(src); err != nil {
return fmt.Errorf("bigtable-list-clusters requires a bigtable source: %w", err)
} Type guard
func isBigtableAdminSource(s sources.Source) bool {
_, ok := s.(interface{ ListClusters(context.Context) (any, error) })
return ok
} Try / catch
if err := tool.ValidateSource(src); err != nil {
log.Fatalf("incompatible source for bigtable-list-clusters: %v", err)
} Prevention
- Use kind: bigtable sources for instance-admin tools
- Add automated tool-source compatibility checks in CI
- Keep environments' configs in sync with a single template
- Re-validate bindings after each toolbox release
When it happens
Trigger: Invoking the list-clusters tool, or calling ValidateSource directly, with a source of a different engine kind or a Bigtable source lacking the ListClusters method in the current version.
Common situations: tools.yaml maps the tool to a SQL source; a source was renamed/re-pointed during refactoring; a custom source implementation is missing the admin method set.
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/9ee8a44001170c79.
Report an issue: GitHub.