{"record":{"id":"9fe7276b28c915e6","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-9fe727","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/lookermakedashboard/lookermakedashboard.go","lineNumber":74,"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\tallParameters := parameters.Parameters{}\n\n\ttitleParameter := parameters.NewStringParameter(\"title\", \"The title of the Dashboard\")\n\tallParameters = append(allParameters, titleParameter)\n\tdescParameter := parameters.NewStringParameter(\"description\", \"The description of the Dashboard\", parameters.WithStringDefault(\"\"))\n\tallParameters = append(allParameters, descParameter)\n\tfolderParameter := parameters.NewStringParameter(\"folder\", \"The folder id where the Dashboard will be created. Leave blank to use the user's personal folder\", parameters.WithStringDefault(\"\"))\n\tallParameters = append(allParameters, folderParameter)\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.NewWriteAnnotations),\n\t\t\ttools.Manifest{Description: cfg.Description, Parameters: allParameters.Manifest(), AuthRequired: cfg.AuthRequired},\n\t\t\tallParameters,","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookermakedashboard/lookermakedashboard.go#L56-L92","documentation":"Config.Initialize for the looker-make-dashboard tool requires a non-empty `description` before constructing the tool. Because MCP clients rely on the description to understand the tool, an empty description is rejected at load time with this error naming the offending tool.","triggerScenarios":"A tools.yaml tool entry of kind looker-make-dashboard has no `description` key or an empty string value, so Initialize returns this error during config parsing.","commonSituations":"Minimal hand-written configs; automated generators omitting descriptions; YAML misindentation placing description under a sibling key so cfg.Description stays empty.","solutions":["Add a meaningful `description` to the looker-make-dashboard tool entry.","Check YAML indentation to ensure the key belongs to the tool, not a nested block.","Set cfg.Description in code before invoking Initialize for programmatic configs."],"exampleFix":"# before\ntools:\n  make-dash:\n    kind: looker-make-dashboard\n    source: my-looker\n\n# after\ntools:\n  make-dash:\n    kind: looker-make-dashboard\n    source: my-looker\n    description: Creates a Looker dashboard from a list of query titles","handlingStrategy":"validation","validationCode":"// Go: pre-flight validation before Initialize\nif cfg.Description == \"\" {\n    return fmt.Errorf(\"tool %q requires a non-empty description\", cfg.Name)\n}\n// YAML lint: fail CI if any looker-make-dashboard entry lacks description","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil && strings.Contains(err.Error(), \"description is required\") {\n    return fmt.Errorf(\"add description for looker-make-dashboard tool %q\", cfg.Name)\n}","preventionTips":["Include description in every tool template/snippet.","Add a config lint step in CI for required tool fields.","Verify YAML nesting so description is read by the parser.","Search configs for `description: \"\"` before deploying."],"tags":["go","looker","validation","configuration"],"backgroundTag":"missing-required-argument","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"}