{"record":{"id":"ff5ca8640e8cc1f2","repo":"googleapis/mcp-toolbox","slug":"invalid-source-for-q-tool-source-q-is-not-a-com-ff5ca8","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/looker/lookerrundashboard/lookerrundashboard.go","lineNumber":112,"sourceCode":"// validate interface\nvar _ tools.Tool = Tool{}\n\ntype Tool struct {\n\ttools.BaseTool[Config]\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\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\tlogger, err := util.LoggerFromContext(ctx)\n\tif err != nil {\n\t\treturn nil, util.NewClientServerError(\"unable to get logger from ctx\", http.StatusInternalServerError, err)\n\t}\n\tlogger.DebugContext(ctx, \"params = \", params)\n\tparamsMap := params.AsMap()\n\n\tdashboard_id := paramsMap[\"dashboard_id\"].(string)\n","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookerrundashboard/lookerrundashboard.go#L94-L130","documentation":"ValidateSource type-asserts the resolved source against the tool's compatibleSource interface (Looker API access). The error fires when the tool is bound to a source that is not a Looker source, i.e. the tool kind and source kind in the YAML configuration are incompatible.","triggerScenarios":"Thrown at internal/tools/looker/lookerrundashboard/lookerrundashboard.go:112 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point the tool's 'source' field at a Looker source defined in tools.yaml","Ensure the source's kind is 'looker' rather than an incompatible source type","Correct any typo in the source name that resolved to the wrong source"],"exampleFix":null,"handlingStrategy":"validation","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"}