{"record":{"id":"a008f8d600645a6a","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-a008f8","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/lookerupdatedashboardlayoutcomponent/lookerupdatedashboardlayoutcomponent.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\tcomponentIdParam := parameters.NewStringParameter(\"dashboard_layout_component_id\", \"The ID of the dashboard layout component to update.\")\n\tlayoutIdParam := parameters.NewStringParameter(\"dashboard_layout_id\", \"The ID of the target dashboard layout (tab) to move the component to.\", parameters.WithStringRequired(false))\n\trowParam := parameters.NewIntParameter(\"row\", \"The new row position.\", parameters.WithIntRequired(false))\n\tcolumnParam := parameters.NewIntParameter(\"column\", \"The new column position.\", parameters.WithIntRequired(false))\n\twidthParam := parameters.NewIntParameter(\"width\", \"The new width.\", parameters.WithIntRequired(false))\n\theightParam := parameters.NewIntParameter(\"height\", \"The new height.\", parameters.WithIntRequired(false))\n\n\tparams := parameters.Parameters{\n\t\tcomponentIdParam,\n\t\tlayoutIdParam,\n\t\trowParam,\n\t\tcolumnParam,\n\t\twidthParam,\n\t\theightParam,\n\t}\n","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookerupdatedashboardlayoutcomponent/lookerupdatedashboardlayoutcomponent.go#L53-L89","documentation":"Initialize for looker-update-dashboard-layout-component enforces a non-empty `description` on the tool config before constructing its parameters. The description is required for MCP tool registration, so an empty one aborts initialization with this error.","triggerScenarios":"A kind looker-update-dashboard-layout-component tool entry is parsed with no `description:` field or an empty string, during server startup or dynamic config load.","commonSituations":"Hand-written configs missing the description; templating that omits empty values; bulk config migrations that dropped the field.","solutions":["Add a non-empty `description:` to the tool entry","Fix the config generator/template to always emit description","Add a startup-time validation that all tool configs have descriptions"],"exampleFix":"// before\ntools:\n  update_layout_component:\n    kind: looker-update-dashboard-layout-component\n    source: my-looker-source\n// after\ntools:\n  update_layout_component:\n    kind: looker-update-dashboard-layout-component\n    source: my-looker-source\n    description: Update or move a dashboard layout component within a Looker dashboard.","handlingStrategy":"validation","validationCode":"if cfg.Description == \"\" {\n    return errors.New(\"looker-update-dashboard-layout-component tool requires a non-empty description\")\n}","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil {\n    if strings.Contains(err.Error(), \"description is required\") {\n        return fmt.Errorf(\"set `description` for tool %q\", cfg.Name)\n    }\n    return err\n}","preventionTips":["Require description in your tool YAML schema/lint","Never generate tool entries without a description value","Add a boot-time precheck listing tools missing descriptions"],"tags":["go","looker","config-validation","missing-field"],"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"}