{"record":{"id":"b00442a1d4ffb3e8","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-b00442","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/lookerhealthpulse/lookerhealthpulse.go","lineNumber":76,"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\tParameters       map[string]any         `yaml:\"parameters\"`\n\tAnnotations      *tools.ToolAnnotations `yaml:\"annotations,omitempty\"`\n}\n\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\tactionParameter := parameters.NewStringParameter(\"action\", \"The health check to run. Can be either: `check_db_connections`, `check_dashboard_performance`,`check_dashboard_errors`,`check_explore_performance`,`check_schedule_failures`, or `check_legacy_features`\", parameters.WithStringRequired(true))\n\n\tallParameters := parameters.Parameters{\n\t\tactionParameter,\n\t}\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":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookerhealthpulse/lookerhealthpulse.go#L58-L94","documentation":"Config.Initialize for looker-health-pulse requires a non-empty Description and returns this error otherwise. The description is required because it is surfaced to MCP clients as the tool's documentation. Validation happens immediately at tool initialization, so misconfigured YAML fails at startup rather than at request time.","triggerScenarios":"A looker-health-pulse tool entry in tools.yaml (or a Config built in code) lacks the description field or has it set to an empty string when Initialize is called.","commonSituations":"Forgotten description key when copying an existing tool block, YAML typo like `descriptions:` or wrong indentation, template-generated configs omitting the field.","solutions":["Set a descriptive description for the tool in tools.yaml.","Fix YAML indentation/typo so description is recognized under the tool.","Run the toolbox locally to confirm config loads without error.","Add config linting or schema validation to CI for tools.yaml."],"exampleFix":"// before\nmy_pulse:\n  kind: looker-health-pulse\n  source: my-looker-instance\n// after\nmy_pulse:\n  kind: looker-health-pulse\n  source: my-looker-instance\n  description: Runs health checks on Looker such as DB connections, dashboard performance, and schedule failures.","handlingStrategy":"validation","validationCode":"if cfg.Name != \"\" && cfg.Description == \"\" {\n    return fmt.Errorf(\"tool %q: description is required\", cfg.Name)\n}","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil && strings.Contains(err.Error(), \"description is required\") {\n    return fmt.Errorf(\"fix tools.yaml: set description for %q\", cfg.Name)\n}","preventionTips":["Never leave description empty in tool YAML blocks","Enforce required fields with a JSON/YAML schema in CI","Validate config with `go run .` before merging","Use descriptions that also document valid action enums for the LLM"],"tags":["go","looker","config-validation","missing-field"],"backgroundTag":"missing-required-config-field","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"}