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-instances tool's ValidateSource returns this error when the provided sources.Source does not satisfy its compatibleSource interface (the Bigtable source that can list instances). The assertion fails for any source type other than the Bigtable source or a build where its method set changed. It is raised before any Bigtable admin API call is attempted.
Source
Thrown at internal/tools/bigtable/bigtablelistinstances/bigtablelistinstances.go:92
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)
}
instances, err := source.ListInstances(ctx)
if err != nil {
return nil, util.ProcessGcpError(err)
}View on GitHub (pinned to 8cc6e09de2)
Solutions
- Set the tool's source to a bigtable-kind source in tools.yaml
- Verify the source implements the expected ListInstances capability
- Align toolbox and source versions and rebuild
- Validate configuration at startup to surface mismatches immediately
Example fix
// before source: bigquery-warehouse // after source: bigtable-instance-source
Defensive patterns
Strategy: validation
Validate before calling
if err := tool.ValidateSource(mySource); err != nil {
return fmt.Errorf("bigtable-list-instances needs a bigtable source: %w", err)
} Type guard
func isBigtableInstanceSource(s sources.Source) bool {
_, ok := s.(interface{ ListInstances(context.Context) (any, error) })
return ok
} Try / catch
if err := tool.ValidateSource(src); err != nil {
log.Fatalf("wrong source for bigtable-list-instances: %v", err)
} Prevention
- Check that tools.yaml tool entries reference bigtable sources
- Validate config at startup before accepting requests
- Avoid hand-editing kind: fields in shared configs
- Pin the toolbox version used across environments
When it happens
Trigger: ValidateSource is invoked, or the tool is executed through the server, with a non-Bigtable source (e.g. postgres, alloydb, bigquery) or an incompatible custom source.
Common situations: Wrong source referenced in the tool's tools.yaml entry; source kind edited by mistake; version mismatch after a toolbox upgrade altered the internal source 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/86e031f592673bc5.
Report an issue: GitHub.