{"record":{"id":"3efe39f5c35e84bf","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-3efe39","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/lookermakelook/lookermakelook.go","lineNumber":75,"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 := lookercommon.GetQueryParameters()\n\n\ttitleParameter := parameters.NewStringParameter(\"title\", \"The title of the Look\")\n\tallParameters = append(allParameters, titleParameter)\n\tdescParameter := parameters.NewStringParameter(\"description\", \"The description of the Look\", parameters.WithStringDefault(\"\"))\n\tallParameters = append(allParameters, descParameter)\n\tfolderParameter := parameters.NewStringParameter(\"folder\", \"The folder id where the Look will be created. Leave blank to use the user's personal folder\", parameters.WithStringDefault(\"\"))\n\tallParameters = append(allParameters, folderParameter)\n\tvizParameter := parameters.NewMapParameter(\"vis_config\", \"The visualization config for the query\", \"\", parameters.WithMapDefault(\n\t\tmap[string]any{}))\n\tallParameters = append(allParameters, vizParameter)\n\n\t// finish tool setup\n\treturn Tool{\n\t\tBaseTool: tools.NewBaseTool(\n\t\t\tcfg,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookermakelook/lookermakelook.go#L57-L93","documentation":"Config.Initialize for the looker-make-look tool checks that `description` is set before assembling parameters (via lookercommon.GetQueryParameters plus the title parameter) and building the tool. An empty description aborts initialization with this error, since MCP tool specs require a description.","triggerScenarios":"Loading a tools.yaml entry of kind looker-make-look without a `description` field (or with an empty string), triggering the guard at the top of Initialize.","commonSituations":"Omitting description while copy-editing YAML; generators producing skeleton configs; misindentation causing the value to land under another key; empty string left after stripping placeholder text.","solutions":["Add a non-empty `description` to the looker-make-look tool entry.","Confirm the description is at the tool's top level in the YAML block.","For code-built configs, assign cfg.Description before Initialize."],"exampleFix":"# before\ntools:\n  make-look:\n    kind: looker-make-look\n    source: my-looker\n\n# after\ntools:\n  make-look:\n    kind: looker-make-look\n    source: my-looker\n    description: Creates a Looker Look from a query and title","handlingStrategy":"validation","validationCode":"// Go: validate before Initialize\nif cfg.Description == \"\" {\n    return fmt.Errorf(\"tool %q is missing its description\", cfg.Name)\n}\n// YAML lint: every looker-make-look entry must define a non-empty description","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil && strings.Contains(err.Error(), \"description is required\") {\n    return fmt.Errorf(\"set description for looker-make-look tool %q\", cfg.Name)\n}","preventionTips":["Always ship a description with looker-make-look configs.","Add required-field linting to your config CI pipeline.","Double-check YAML indentation after editing tool blocks.","Replace placeholder descriptions rather than deleting them."],"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"}