{"record":{"id":"1f9f33ef5617e3d0","repo":"googleapis/mcp-toolbox","slug":"invalid-source-for-q-tool-source-q-is-not-a-com-1f9f33","errorCode":null,"errorMessage":"invalid source for %q tool: source %q is not a compatible type","messagePattern":"invalid source for %q tool: source %q is not a compatible type","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/singlestore/singlestoreexecutesql/singlestoreexecutesql.go","lineNumber":137,"sourceCode":"}\n\n// EmbedParams overrides BaseTool to apply the pgvector formatter.\nfunc (t Tool) EmbedParams(ctx context.Context, paramValues parameters.ParamValues, pMgr tools.PrimitiveManagerI) (parameters.ParamValues, error) {\n\treturn parameters.EmbedParams(ctx, t.StaticParameters, paramValues, pMgr, embeddingmodels.FormatVectorForPgvector)\n}\n\nfunc (t Tool) GetSourceName() string {\n\treturn t.Cfg.Source\n}\n\nfunc (t Tool) ToConfig() tools.ToolConfig {\n\treturn t.Cfg\n}\n\nfunc (t Tool) ValidateSource(source sources.Source) error {\n\t_, ok := source.(compatibleSource)\n\tif !ok {\n\t\treturn fmt.Errorf(\"invalid source for %q tool: source %q is not a compatible type\", t.Cfg.Type, t.Cfg.Source)\n\t}\n\treturn nil\n}\n","sourceCodeStart":119,"sourceCodeEnd":141,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/singlestore/singlestoreexecutesql/singlestoreexecutesql.go#L119-L141","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set the tool's `source` to a source declared with `kind: singlestore`.","Fix the source entry's kind (singlestore with proper connection config) or correct the referenced name.","Search the tools file for all singlestore-* tools and verify each source field."],"exampleFix":"# before\ntools:\n  exec-sql:\n    kind: singlestore-execute-sql\n    source: mysql-src\n# after\ntools:\n  exec-sql:\n    kind: singlestore-execute-sql\n    source: singlestore-src","handlingStrategy":"validation","validationCode":"tools:\n  exec-sql:\n    kind: singlestore-execute-sql\n    source: singlestore-src  # must be kind: singlestore","typeGuard":"func isSingleStoreSource(s sources.Source) bool {\n    _, ok := s.(singlestore.Source)\n    return ok\n}","tryCatchPattern":null,"preventionTips":["Confirm the source kind (singlestore) whenever adding or editing singlestore-* tools.","Name sources by engine to make mismatches obvious in review.","Run the toolbox binary against the config locally before deployment."],"tags":["configuration","go","type-mismatch","singlestore"],"backgroundTag":"incompatible-source-type","analyzedSha":"8cc6e09de2ad7b8bffc77751799585a1401a48eb","analyzedAt":"2026-09-05T01:10:36.887Z","contentChangedAt":"2026-09-05T01:10:36.887Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}