{"record":{"id":"8828ce3e2d6c1db5","repo":"googleapis/mcp-toolbox","slug":"invalid-source-for-q-tool-source-q-is-not-a-com-8828ce","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":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/dataplex/dataplexupdatedataasset/dataplexupdatedataasset.go","lineNumber":112,"sourceCode":"\ntype Tool struct {\n\ttools.BaseTool[Config]\n}\n\nvar _ tools.Tool = Tool{}\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\nfunc (t Tool) Invoke(ctx context.Context, s sources.Source, params parameters.ParamValues, accessToken tools.AccessToken) (any, util.ToolboxError) {\n\tsource, ok := s.(compatibleSource)\n\tif !ok {\n\t\treturn nil, util.NewClientServerError(\"source used is not compatible with the tool\", http.StatusInternalServerError, nil)\n\t}\n\tparamsMap := params.AsMap()\n\tlocationId, ok := paramsMap[\"locationId\"].(string)\n\tif !ok || locationId == \"\" {\n\t\treturn nil, util.NewAgentError(\"locationId is required and must be a string\", nil)\n\t}\n\n\tdataProductId, ok := paramsMap[\"dataProductId\"].(string)\n\tif !ok || dataProductId == \"\" {\n\t\treturn nil, util.NewAgentError(\"dataProductId is required and must be a string\", nil)","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/dataplex/dataplexupdatedataasset/dataplexupdatedataasset.go#L94-L130","documentation":"Source-compatibility check in ValidateSource: the configured source does not implement the Dataplex compatibleSource interface required by the update-data-asset tool, so it cannot serve Dataplex API calls.","triggerScenarios":"Thrown at internal/tools/dataplex/dataplexupdatedataasset/dataplexupdatedataasset.go:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the tool's source field at a dataplex source instance","Verify the source kind in tools.yaml matches the Dataplex source"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}