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 bigtableupdateinstance Tool.ValidateSource when the provided sources.Source does not implement the tool's compatibleSource interface. It prevents the instance-update tool from operating on an incompatible source before any mutation occurs.
Source
Thrown at internal/tools/bigtable/bigtableupdateinstance/bigtableupdateinstance.go:95
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.UpdateInstance(ctx, paramsMap["instance_id"].(string), paramsMap["display_name"].(string))
if err != nil {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Point the tool's source field at a compatible bigtable source
- Verify the source name matches an initialized Bigtable source
- Restart the toolbox to apply the corrected config
- Pass the correct concrete Source type when invoking programmatically
Example fix
// before (tools.yaml)
tools:
update-instance:
kind: bigtable-update-instance
source: my-mysql-db
// after
tools:
update-instance:
kind: bigtable-update-instance
source: my-bigtable-instance Defensive patterns
Strategy: type-guard
Validate before calling
// Verify compatibility before invoking the instance-update tool
if err := tool.ValidateSource(mySource); err != nil {
return fmt.Errorf("source %s cannot back bigtable-update-instance", sourceName)
} Type guard
func isCompatibleUpdateInstanceSource(s sources.Source) bool {
_, ok := s.(bigtableupdateinstance.CompatibleSource)
return ok
} Prevention
- Ensure bigtable-update-instance references a bigtable source kind
- Add startup config validation to catch mismatched source kinds early
- Review tool source references after config refactors
- Test tool initialization locally before merging config changes
When it happens
Trigger: ValidateSource/Invoke is called with a source failing the type assertion to the bigtableupdateinstance compatibleSource interface — typically a tools.yaml source reference of the wrong kind.
Common situations: Wiring bigtable-update-instance to a source of another database kind; copy-paste tool templates; config refactor that swapped source names.
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/7cee13df94407714.
Report an issue: GitHub.