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

The singlestore-execute-sql tool throws this in ValidateSource when the source bound to the tool does not implement its `compatibleSource` interface, i.e. it is not a SingleStore source with the required database pool. Toolbox performs this check when loading the configuration so a tool is never served with a source type whose Invoke would fail. The message names the tool kind and the configured source name to help locate the offending pairing.

Source

Thrown at internal/tools/singlestore/singlestoreexecutesql/singlestoreexecutesql.go:137

}

// EmbedParams overrides BaseTool to apply the pgvector formatter.
func (t Tool) EmbedParams(ctx context.Context, paramValues parameters.ParamValues, pMgr tools.PrimitiveManagerI) (parameters.ParamValues, error) {
	return parameters.EmbedParams(ctx, t.StaticParameters, paramValues, pMgr, embeddingmodels.FormatVectorForPgvector)
}

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 a source declared with `kind: singlestore`.
  2. Fix the source entry's kind (singlestore with proper connection config) or correct the referenced name.
  3. Search the tools file for all singlestore-* tools and verify each source field.

Example fix

# before
tools:
  exec-sql:
    kind: singlestore-execute-sql
    source: mysql-src
# after
tools:
  exec-sql:
    kind: singlestore-execute-sql
    source: singlestore-src
Defensive patterns

Strategy: validation

Validate before calling

tools:
  exec-sql:
    kind: singlestore-execute-sql
    source: singlestore-src  # must be kind: singlestore

Type guard

func isSingleStoreSource(s sources.Source) bool {
    _, ok := s.(singlestore.Source)
    return ok
}

Prevention

When it happens

Trigger: A `singlestore-execute-sql` tool whose `source:` references a non-SingleStore source (postgres, mysql, bigquery, etc.), making the `source.(compatibleSource)` assertion in singlestoreexecutesql.go fail.

Common situations: tools.yaml defining both MySQL and SingleStore sources and the tool pointing at the MySQL one; renaming source keys during cleanup; reusing an example tool block without updating its source.

Related errors


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