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 bigtableupdatetable Tool.ValidateSource when the supplied sources.Source does not implement the tool's compatibleSource interface. The table-update operation is rejected before any API call.
Source
Thrown at internal/tools/bigtable/bigtableupdatetable/bigtableupdatetable.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.UpdateTable(ctx, paramsMap["table_id"].(string), paramsMap["disable_change_stream"].(bool))
if err != nil {View on GitHub (pinned to 8cc6e09de2)
Solutions
- Set the tool's source field to a compatible bigtable source
- Confirm the source is initialized as a Bigtable source
- Restart the toolbox so the corrected pairing takes effect
- Pass the right concrete Source type when calling Invoke directly
Example fix
// before (tools.yaml)
tools:
update-table:
kind: bigtable-update-table
source: my-sql-server
// after
tools:
update-table:
kind: bigtable-update-table
source: my-bigtable-instance Defensive patterns
Strategy: type-guard
Validate before calling
// Confirm compatibility before invoking the table-update tool
if err := tool.ValidateSource(mySource); err != nil {
return fmt.Errorf("source %s is not compatible with bigtable-update-table", sourceName)
} Type guard
func isCompatibleUpdateTableSource(s sources.Source) bool {
_, ok := s.(bigtableupdatetable.CompatibleSource)
return ok
} Prevention
- Reference bigtable sources for bigtable-update-table
- Validate the config at startup so mismatches fail fast
- Track source renames with grep across tools.yaml
- Keep per-kind source naming conventions to reduce wiring mistakes
When it happens
Trigger: ValidateSource/Invoke receives a source failing the type assertion to bigtableupdatetable's compatibleSource — the tool is wired to an incompatible source in tools.yaml or in code.
Common situations: Config mistake where the update-table tool references a non-Bigtable source; copy-pasted tool blocks; renamed sources not propagated to tools.
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/6e1d1b40e550a278.
Report an issue: GitHub.