googleapis/mcp-toolbox · error

source is not compatible with the tool

Error message

source is not compatible with the tool

What it means

bigtable-list-schemas' ValidateSource emits this error when the provided source fails its compatibleSource type assertion, meaning it cannot enumerate Bigtable schemas/views/tables. Only the Bigtable source satisfies the interface; any other source kind is rejected before invocation. This guards the tool from being paired with an engine that cannot serve its operations.

Source

Thrown at internal/tools/bigtable/bigtablelistschemas/bigtablelistschemas.go:102

			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
}

type TableSchema struct {
	TableName string              `json:"table_name"`
	Info      *bigtable.TableInfo `json:"info,omitempty"`
}

type Column struct {
	Name string `json:"name"`
	Type string `json:"type,omitempty"`
}

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Point bigtable-list-schemas at a source declared with kind: bigtable
  2. Ensure the source implements the tool's compatibleSource method set
  3. Rebuild/redeploy with aligned toolbox and config versions
  4. Add startup or CI-time validation of tool-source compatibility

Example fix

// before
kind: bigtable-list-schemas
source: mysql-src
// after
kind: bigtable-list-schemas
source: bigtable-src
Defensive patterns

Strategy: validation

Validate before calling

if err := tool.ValidateSource(src); err != nil {
    return fmt.Errorf("bigtable-list-schemas requires a bigtable source: %w", err)
}

Type guard

func isBigtableSchemaSource(s sources.Source) bool {
    _, ok := s.(interface {
        ListTables(context.Context, string) (any, error)
        ListViews(context.Context) (any, error)
    })
    return ok
}

Try / catch

if err := tool.ValidateSource(src); err != nil {
    log.Fatalf("incompatible source for bigtable-list-schemas: %v", err)
}

Prevention

When it happens

Trigger: Calling ValidateSource or invoking the tool with a source such as postgres/mysql/spanner, or an incompatible custom/older Bigtable source missing the required methods.

Common situations: Wrong 'source:' field in the tool block; source kind changed during migration; version skew between the toolbox binary and the checked-out config.

Related errors


AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05). Data as JSON: /api/errors/fb7b212aa92287d6. Report an issue: GitHub.