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-sql tool throws this in ValidateSource when its configured source fails the `compatibleSource` type assertion — the source is not a SingleStore source exposing the expected database pool. This is a startup-time guard: Toolbox validates every tool/source pairing while loading tools.yaml so incompatible combinations are rejected before serving requests.
Source
Thrown at internal/tools/singlestore/singlestoresql/singlestoresql.go:156
}
// 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
- Point the tool's `source` at a `kind: singlestore` source.
- Add a properly configured singlestore source if missing, then reference it.
- Validate the full tools.yaml by starting Toolbox locally and resolving all ValidateSource errors before deploying.
Example fix
# before
tools:
query-tool:
kind: singlestore-sql
source: pg-src
# after
tools:
query-tool:
kind: singlestore-sql
source: singlestore-src Defensive patterns
Strategy: validation
Validate before calling
sources:
singlestore-src:
kind: singlestore
tools:
query-tool:
kind: singlestore-sql
source: singlestore-src Type guard
func isSingleStoreSource(s sources.Source) bool {
_, ok := s.(singlestore.Source)
return ok
} Prevention
- Cross-check every singlestore-sql tool's source against the sources section after merges.
- Avoid generic source names like `db` that invite cross-engine misbinding.
- Validate configs by starting Toolbox locally; the error names the exact tool and source.
When it happens
Trigger: A `singlestore-sql` tool whose `source:` names a source of another kind (e.g. postgres, mssql), so `source.(compatibleSource)` returns false in singlestoresql.go and the formatted error is returned.
Common situations: Mixed-database configs where similar tool names (postgres-sql vs singlestore-sql) get swapped sources; copy-paste from another integration's docs; config merge tools rewriting source keys.
Related errors
- invalid source for %q tool: source %q is not a compatible ty
- invalid source for %q tool: source %q is not a compatible ty
- invalid source for %q tool: source %q is not a compatible ty
- invalid source for %q tool: source %q is not a compatible ty
- invalid source for %q tool: source %q is not a compatible ty
AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05).
Data as JSON: /api/errors/97620ca8a99c6ef2.
Report an issue: GitHub.