{"record":{"id":"4f0ad10e297a0d16","repo":"googleapis/mcp-toolbox","slug":"invalid-source-for-q-tool-source-q-is-not-a-com-4f0ad1","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/arcadedb/arcadedbexecutesql/arcadedbexecutesql.go","lineNumber":155,"sourceCode":"\treturn resp, nil\n}\n\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, nil)\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":137,"sourceCodeEnd":159,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/arcadedb/arcadedbexecutesql/arcadedbexecutesql.go#L137-L159","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Set the tool's source to an arcadedb source.","Confirm the referenced source's kind is arcadedb in the sources: section.","Update test mocks to implement the compatibleSource interface."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if err := tool.ValidateSource(src); err != nil {\n    return fmt.Errorf(\"arcadedb-execute-sql bound to non-ArcadeDB source: %w\", err)\n}","typeGuard":"cs, ok := src.(arcadedbexecutesql.CompatibleSource)\nif !ok {\n    return fmt.Errorf(\"source %T is not an ArcadeDB source\", src)\n}","tryCatchPattern":"if err := tool.ValidateSource(src); err != nil {\n    log.Fatalf(\"source binding error: %v\", err)\n}","preventionTips":["Match tool kind prefix to source kind (arcadedb-* with arcadedb).","Run startup validation of every tool against its bound source.","Keep source kind declarations adjacent to tools in your config for reviewability."],"tags":["configuration","type-mismatch","arcadedb","source-validation"],"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"}