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 bigtableupdatelogicalview Tool.ValidateSource when the supplied source does not implement the tool's compatibleSource interface. The logical-view update is rejected before contacting the Bigtable admin API.
Source
Thrown at internal/tools/bigtable/bigtableupdatelogicalview/bigtableupdatelogicalview.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.UpdateLogicalView(ctx, paramsMap["instance_id"].(string), paramsMap["logical_view_id"].(string), paramsMap["query"].(string))
if err != nil {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Set the tool's source to a compatible bigtable source in tools.yaml
- Confirm the source initializes as a Bigtable source
- Restart the toolbox to reload configuration
- Pass the correct concrete Source type satisfying compatibleSource in code
Example fix
// before (tools.yaml)
tools:
update-logical-view:
kind: bigtable-update-logical-view
source: my-alloydb
// after
tools:
update-logical-view:
kind: bigtable-update-logical-view
source: my-bigtable-instance Defensive patterns
Strategy: type-guard
Validate before calling
// Check compatibility before invoking the logical-view update
if err := tool.ValidateSource(mySource); err != nil {
return fmt.Errorf("source %s is not usable by bigtable-update-logical-view", sourceName)
} Type guard
func isCompatibleLogicalViewSource(s sources.Source) bool {
_, ok := s.(bigtableupdatelogicalview.CompatibleSource)
return ok
} Prevention
- Attach bigtable-update-logical-view only to Bigtable sources
- Validate source-tool pairs at server startup
- Grep tools.yaml for the tool's source reference after renames
- Keep admin/mutation tools separated per source kind in config
When it happens
Trigger: ValidateSource/Invoke receives a source failing the type assertion to bigtableupdatelogicalview's compatibleSource — the tool is attached to a non-Bigtable or otherwise incompatible source.
Common situations: Misconfigured tools.yaml where source points at the wrong source kind; duplicated tool blocks for different sources; programmatic tool construction with a mismatched Source.
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/b7dc53fd2bc176d9.
Report an issue: GitHub.