{"record":{"id":"26ca3ea5d542a568","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-26ca3e","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/lookergenerateembedurl/lookergenerateembedurl.go","lineNumber":74,"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\ttypeParameter := parameters.NewStringParameter(\"type\", \"Type of Looker content to embed (ie. dashboards, looks, query-visualization)\", parameters.WithStringDefault(\"\"))\n\tidParameter := parameters.NewStringParameter(\"id\", \"The ID of the content to embed.\", parameters.WithStringDefault(\"\"))\n\tparams := parameters.Parameters{\n\t\ttypeParameter,\n\t\tidParameter,\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: params.Manifest(), AuthRequired: cfg.AuthRequired},\n\t\t\tparams,\n\t\t),\n\t}, nil","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookergenerateembedurl/lookergenerateembedurl.go#L56-L92","documentation":"Looker tool configs require a non-empty description, which is exposed to MCP clients as the tool's description. Initialize fails fast with this error when Config.Description is empty, preventing registration of an undocumented lookergenerateembedurl tool.","triggerScenarios":"A lookergenerateembedurl tool YAML entry lacking the description field when Initialize runs during config load.","commonSituations":"Hand-authored configs missing description; programmatically built Config without Description; truncated or copy-pasted tool definitions.","solutions":["Add a description field to the tool config","Set cfg.Description before Initialize in code","Use prebuilt configs which always include descriptions"],"exampleFix":"// before\n- name: generate-embed-url\n  source: my-looker\n// after\n- name: generate-embed-url\n  source: my-looker\n  description: Generates a signed embed URL for Looker content","handlingStrategy":"validation","validationCode":"if strings.TrimSpace(cfg.Description) == \"\" { return errors.New(\"looker tool config requires a description\") }","typeGuard":null,"tryCatchPattern":"if _, err := cfg.Initialize(ctx); err != nil { return fmt.Errorf(\"tool config rejected: %w\", err) }","preventionTips":["Never omit description in tool YAML entries","Run a config lint/CI check for required tool fields","Prefer prebuilt configs for standard use cases"],"tags":["go","looker","config","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"}