googleapis/mcp-toolbox · error

invalid source for %q tool: source %q is not a compatible ty

Error message

invalid source for %q tool: source %q is not a compatible type

What it means

ValidateSource() for arcadedb-execute-sql type-asserts the source to the tool's compatibleSource interface. Sources that are not ArcadeDB sources (lacking the required connection/execution methods) are rejected with this error naming the tool type and configured source name.

Source

Thrown at internal/tools/arcadedb/arcadedbexecutesql/arcadedbexecutesql.go:155

	return resp, nil
}

func (t Tool) EmbedParams(ctx context.Context, paramValues parameters.ParamValues, pMgr tools.PrimitiveManagerI) (parameters.ParamValues, error) {
	return parameters.EmbedParams(ctx, t.StaticParameters, paramValues, pMgr, nil)
}

func (t Tool) GetSourceName() string {
	return t.Cfg.Source
}

func (t Tool) ToConfig() tools.ToolConfig {
	return t.Cfg
}

func (t Tool) ValidateSource(source sources.Source) error {
	_, ok := source.(compatibleSource)
	if !ok {
		return fmt.Errorf("invalid source for %q tool: source %q is not a compatible type", t.Cfg.Type, t.Cfg.Source)
	}
	return nil
}

View on GitHub (pinned to 8cc6e09de2)

Solutions

  1. Set the tool's source to an arcadedb source.
  2. Confirm the referenced source's kind is arcadedb in the sources: section.
  3. Update test mocks to implement the compatibleSource interface.
Defensive patterns

Strategy: type-guard

Validate before calling

if err := tool.ValidateSource(src); err != nil {
    return fmt.Errorf("arcadedb-execute-sql bound to non-ArcadeDB source: %w", err)
}

Type guard

cs, ok := src.(arcadedbexecutesql.CompatibleSource)
if !ok {
    return fmt.Errorf("source %T is not an ArcadeDB source", src)
}

Try / catch

if err := tool.ValidateSource(src); err != nil {
    log.Fatalf("source binding error: %v", err)
}

Prevention

When it happens

Trigger: Binding arcadedb-execute-sql to a source of another kind (postgres, mysql, etc.) and calling ValidateSource during tool registration, or passing an incompatible Source programmatically.

Common situations: Miswired tools.yaml where the tool's source references a different database; refactors renaming/re-typing sources; test code with stub sources missing required methods.

Related errors


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