{"record":{"id":"7cc535683ad67922","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-7cc535","errorCode":null,"errorMessage":"description is required for tool %q","messagePattern":"description is required for tool %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/tools/looker/lookerrunlookmltests/lookerrunlookmltests.go","lineNumber":71,"sourceCode":"}\n\ntype Config struct {\n\ttools.ConfigBase `yaml:\",inline\"`\n\tType             string                 `yaml:\"type\" validate:\"required\"`\n\tSource           string                 `yaml:\"source\" validate:\"required\"`\n\tAnnotations      *tools.ToolAnnotations `yaml:\"annotations,omitempty\"`\n}\n\n// validate interface\nvar _ tools.ToolConfig = Config{}\n\nfunc (cfg Config) ToolConfigType() string {\n\treturn resourceType\n}\n\nfunc (cfg Config) Initialize(context.Context) (tools.Tool, error) {\n\tif cfg.Description == \"\" {\n\t\treturn nil, fmt.Errorf(\"description is required for tool %q\", cfg.Name)\n\t}\n\n\tprojectIdParameter := parameters.NewStringParameter(\"project_id\", \"The id of the project to run LookML tests for.\")\n\tfileIdParameter := parameters.NewStringParameter(\"file_id\", \"Optional id of the file to run tests for.\", parameters.WithStringRequired(false))\n\ttestParameter := parameters.NewStringParameter(\"test\", \"Optional name of the test to run.\", parameters.WithStringRequired(false))\n\tmodelParameter := parameters.NewStringParameter(\"model\", \"Optional name of the model to run tests for.\", parameters.WithStringRequired(false))\n\tallParameters := parameters.Parameters{projectIdParameter, fileIdParameter, testParameter, modelParameter}\n\n\t// finish tool setup\n\treturn Tool{\n\t\tBaseTool: tools.NewBaseTool(\n\t\t\tcfg,\n\t\t\ttools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewReadOnlyAnnotations),\n\t\t\ttools.Manifest{Description: cfg.Description, Parameters: allParameters.Manifest(), AuthRequired: cfg.AuthRequired},\n\t\t\tallParameters,\n\t\t),\n\t}, nil\n}","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookerrunlookmltests/lookerrunlookmltests.go#L53-L89","documentation":"Initialize rejects a tool configuration whose 'description' field is empty. Description is mandatory for this tool type (it feeds the LLM tool manifest), so the error fires during startup when the tools.yaml entry omits or leaves blank the 'description' key.","triggerScenarios":"Thrown at internal/tools/looker/lookerrunlookmltests/lookerrunlookmltests.go:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add a non-empty 'description' field to the tool entry in tools.yaml","Describe what the tool does so the LLM can select it appropriately"],"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"}