{"record":{"id":"546d9f70ffa870d9","repo":"googleapis/mcp-toolbox","slug":"invalid-source-for-q-tool-source-q-is-not-a-com-546d9f","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/arcadedbexecutecypher/arcadedbexecutecypher.go","lineNumber":152,"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":134,"sourceCodeEnd":156,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/arcadedb/arcadedbexecutecypher/arcadedbexecutecypher.go#L134-L156","documentation":"ValidateSource() for arcadedb-execute-cypher asserts the bound source implements the tool's compatibleSource interface (an ArcadeDB HTTP-capable source). Any other source type fails with this error naming the tool type and source name.","triggerScenarios":"Attaching the cypher tool to a non-ArcadeDB source (e.g. postgres) and validating at startup, or passing a wrong source directly to ValidateSource.","commonSituations":"Copy-pasted tool configs referencing the wrong source name; source kind changed from arcadedb to something else while tools still point at it.","solutions":["Point the tool's source at an arcadedb source.","Verify the source kind in the sources: section is arcadedb.","If targeting another database, use that engine's execute-sql/cypher tool instead."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if err := tool.ValidateSource(src); err != nil {\n    return fmt.Errorf(\"arcadedb-execute-cypher bound to non-ArcadeDB source: %w\", err)\n}","typeGuard":"cs, ok := src.(arcadedbexecutecypher.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    return fmt.Errorf(\"source validation failed: %w\", err)\n}","preventionTips":["Only pair arcadedb tools with arcadedb sources.","Validate all tool/source pairs at startup in a smoke test.","Review diffs to tools.yaml for source-name drift after refactors."],"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"}