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-tables tool's ValidateSource returns this error when its compatibleSource assertion fails: the supplied source cannot list tables in a Bigtable instance. Because the toolbox wires tools to sources by name at runtime, only the concrete Bigtable source passes. The error is returned before any Bigtable API call, indicating a configuration mismatch.
Source
Thrown at internal/tools/bigtable/bigtablelisttables/bigtablelisttables.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)
}
tables, err := source.ListTables(ctx)
if err != nil {
return nil, util.ProcessGcpError(err)
}View on GitHub (pinned to 8cc6e09de2)
Solutions
- Bind the tool to a source with kind: bigtable in the config
- Verify the source implements the tool's expected method set
- Align toolbox and source versions and rebuild the binary
- Validate tool-source pairings at startup and in CI
Example fix
// before source: my-postgres-source // after source: my-bigtable-source
Defensive patterns
Strategy: validation
Validate before calling
if err := tool.ValidateSource(mySource); err != nil {
return fmt.Errorf("bigtable-list-tables needs a bigtable source: %w", err)
} Type guard
func isBigtableListTablesSource(s sources.Source) bool {
_, ok := s.(interface{ ListTables(context.Context, string) (any, error) })
return ok
} Try / catch
if err := tool.ValidateSource(src); err != nil {
log.Fatalf("wrong source for bigtable-list-tables: %v", err)
} Prevention
- Verify each bigtable-* tool references a bigtable source in tools.yaml
- Run config validation before deploying
- Grep tool blocks for source names when renaming sources
- Keep toolbox and configs versioned together
When it happens
Trigger: ValidateSource invoked, or the tool executed via the server, with a non-Bigtable source or a source lacking the required ListTables-style method for this toolbox version.
Common situations: tools.yaml references the wrong source for the tool; a source was renamed or its kind changed; custom source implementations not updated to the current interface after an upgrade.
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/27489c30527cdfb8.
Report an issue: GitHub.