{"record":{"id":"9b92704040fbc4d9","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-9b9270","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/lookergetprojectfile/lookergetprojectfile.go","lineNumber":72,"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 containing the files\")\n\tfilePathParameter := parameters.NewStringParameter(\"file_path\", \"The path of the file within the project\")\n\tallParameters := parameters.Parameters{projectIdParameter, filePathParameter}\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","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookergetprojectfile/lookergetprojectfile.go#L54-L90","documentation":"looker-get-project-file Config.Initialize requires a non-empty description. Because the description is published in the MCP manifest consumed by LLM clients, an empty description makes the tool config invalid and initialization aborts with this error.","triggerScenarios":"tools.yaml declares a looker-get-project-file tool without `description`, or Go code builds the Config with an empty Description and calls Initialize.","commonSituations":"Missing YAML field; wrong indentation placing description outside the tool block; templating leaving the field blank.","solutions":["Add a descriptive `description` to the tool entry in tools.yaml.","Verify indentation so description is a child of the tool.","Set Description programmatically before calling Initialize.","Run `toolbox validate` to catch missing descriptions pre-deploy."],"exampleFix":"// before\n  get-project-file:\n    kind: looker-get-project-file\n    source: my-looker\n// after\n  get-project-file:\n    kind: looker-get-project-file\n    source: my-looker\n    description: Fetches the contents of a file within a Looker project.","handlingStrategy":"validation","validationCode":"if strings.TrimSpace(cfg.Description) == \"\" {\n    return errors.New(\"tool 'get-project-file': description is required\")\n}","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil {\n    log.Fatalf(\"invalid looker-get-project-file config: %v\", err)\n}","preventionTips":["Always include a description for looker-get-project-file entries.","Use `toolbox validate` pre-deploy to catch empty fields.","Watch YAML indentation when adding tool fields.","Reject blank description strings in config generators."],"tags":["go","looker","mcp-toolbox","config-validation"],"backgroundTag":"missing-tool-description","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"}