{"record":{"id":"4ed5dc80cc06a95d","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-4ed5dc","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/lookerdeletegitbranch/lookerdeletegitbranch.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\tprojectIdParameter := parameters.NewStringParameter(\"project_id\", \"The project_id\")\n\tbranchParameter := parameters.NewStringParameter(\"branch\", \"The git branch to delete\")\n\tparams := parameters.Parameters{projectIdParameter, branchParameter}\n\n\tannotations := &tools.ToolAnnotations{}\n\tif cfg.Annotations != nil {\n\t\t*annotations = *cfg.Annotations\n\t}\n\treadOnlyHint := false\n\tdestructiveHint := true\n\tannotations.ReadOnlyHint = &readOnlyHint\n\tannotations.DestructiveHint = &destructiveHint\n\n\t// finish tool setup\n\treturn Tool{\n\t\tBaseTool: tools.NewBaseTool(","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookerdeletegitbranch/lookerdeletegitbranch.go#L53-L89","documentation":"Config.Initialize for the looker-delete-gitbranch tool requires a non-empty description (inherited from tools.ConfigBase). Initialize is called while parsing the tool config; an empty description means the MCP tool manifest could not be built meaningfully, so initialization fails immediately with this error.","triggerScenarios":"Defining a looker-delete-gitbranch tool in the YAML (or programmatically) without a `description` field, or with `description: \"\"`.","commonSituations":"Hand-writing minimal tool configs and omitting description; templated configs where the description variable renders empty; YAML key misspelled (e.g. `desc:`) so the field decodes to zero value.","solutions":["Add a non-empty `description:` field to the looker-delete-gitbranch tool definition.","Check the YAML key spelling is exactly `description` and it is not overridden to empty by an environment placeholder.","If generating configs, validate that every tool block includes a description before loading."],"exampleFix":"# before\ntools:\n  delete-branch:\n    kind: looker-delete-gitbranch\n    source: my-looker\n\n# after\ntools:\n  delete-branch:\n    kind: looker-delete-gitbranch\n    source: my-looker\n    description: Deletes a git branch in a Looker project","handlingStrategy":"validation","validationCode":"// pre-flight check on decoded tool config\nif cfg.Description == \"\" {\n\treturn fmt.Errorf(\"tool %q must define a non-empty `description` field\", cfg.Name)\n}","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil {\n\treturn fmt.Errorf(\"invalid looker-delete-gitbranch config: %w (add a `description` field)\", err)\n}","preventionTips":["Include a `description:` in every tool block in the YAML config.","Run a config lint/JSON-schema check before `toolbox` starts.","Watch for env placeholders like ${TOOL_DESC} resolving to empty strings.","Avoid misspelling the key (description, not desc/description-long)."],"tags":["go","looker","config-validation","missing-field","yaml"],"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"}