googleapis/mcp-toolbox · error
source is not compatible with the tool
Error message
source is not compatible with the tool
What it means
Thrown by the bigtableupdatecluster Tool.ValidateSource when the supplied sources.Source does not implement the tool's compatibleSource interface. The tool refuses to run against a source it cannot use, before any Bigtable API call is made.
Source
Thrown at internal/tools/bigtable/bigtableupdatecluster/bigtableupdatecluster.go:96
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.UpdateCluster(ctx, paramsMap["instance_id"].(string), paramsMap["cluster_id"].(string), int32(paramsMap["serve_nodes"].(int)))
if err != nil {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Set the tool's source field to a compatible bigtable source in tools.yaml
- Confirm the referenced source initializes successfully as a Bigtable source
- Restart the toolbox to reload the corrected configuration
- If invoking programmatically, pass the correct concrete Source type satisfying compatibleSource
Example fix
// before (tools.yaml)
tools:
update-cluster:
kind: bigtable-update-cluster
source: my-postgres-db
// after
tools:
update-cluster:
kind: bigtable-update-cluster
source: my-bigtable-instance Defensive patterns
Strategy: type-guard
Validate before calling
// Assert source-tool compatibility before invoking
if err := tool.ValidateSource(mySource); err != nil {
return fmt.Errorf("cannot attach source %s to bigtable-update-cluster: %w", sourceName, err)
} Type guard
func isCompatibleUpdateClusterSource(s sources.Source) bool {
_, ok := s.(bigtableupdatecluster.CompatibleSource)
return ok
} Prevention
- Use Bigtable sources for bigtable-update-* tools
- Run config validation before deploying the toolbox
- Audit tools.yaml after every source rename or deletion
- Keep one source per kind and reference them explicitly
When it happens
Trigger: Invoke/ValidateSource receives a source whose concrete type fails the type assertion to bigtableupdatecluster's compatibleSource — i.e. the tool is wired to a source that is not a compatible Bigtable source in tools.yaml.
Common situations: Pointing the bigtable-update-cluster tool at a non-Bigtable source; reusing a tool config template across sources of different kinds; renaming or replacing a source and missing the tool reference.
Related errors
- invalid source for %q tool: source %q is not a compatible ty
- 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/b28d1ee19314645c.
Report an issue: GitHub.