{"record":{"id":"dd62d3e62f10d0b0","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-dd62d3","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/lookergetprojects/lookergetprojects.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\tallParameters := parameters.Parameters{}\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}\n\n// validate interface\nvar _ tools.Tool = Tool{}\n","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookergetprojects/lookergetprojects.go#L53-L89","documentation":"LookerGetProjects.Config.Initialize requires a non-empty Description because it is used in the tool's manifest shown to LLM clients. An empty Description makes Initialize return this error and abort tool creation. This is a load-time config validation error.","triggerScenarios":"A tools.yaml entry of kind looker-get-projects is defined without a `description:` field or with an empty string, failing Config.Initialize when the toolbox loads its configuration.","commonSituations":"Omitting description when hand-authoring configs; scripts generating YAML that skip empty fields; copy-pasted entries where the description was accidentally deleted.","solutions":["Add a meaningful `description:` to the looker-get-projects tool entry.","Keep descriptions non-empty for all looker-* tools; consider linting your YAML for this.","Reload the toolbox and verify the tool appears in the /mcp manifest."],"exampleFix":"// before\ntools:\n  get-projects:\n    kind: looker-get-projects\n    source: my-looker\n// after\ntools:\n  get-projects:\n    kind: looker-get-projects\n    source: my-looker\n    description: Lists all Looker projects visible to the authenticated user","handlingStrategy":"validation","validationCode":"// Assert every looker-get-projects entry has a description before boot\nfor name, t := range toolsRaw {\n    if t[\"kind\"] == \"looker-get-projects\" && strings.TrimSpace(t[\"description\"].(string)) == \"\" {\n        return fmt.Errorf(\"tool %q must define a non-empty description\", name)\n    }\n}","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil && strings.Contains(err.Error(), \"description is required\") {\n    return fmt.Errorf(\"supply 'description:' for tool %q in tools.yaml: %w\", cfg.Name, err)\n}","preventionTips":["Treat description as a required field for all Looker tool entries.","Add a YAML schema/lint rule enforcing non-empty description for kind: looker-*.","Review generated configs for silently dropped empty fields."],"tags":["go","looker","config","validation"],"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"}