{"record":{"id":"6f60a5b0482daa1b","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-6f60a5","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/lookerlistagents/lookerlistagents.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\tallParameters := parameters.Parameters{}\n\n\tannotations := &tools.ToolAnnotations{}\n\tif cfg.Annotations != nil {\n\t\t*annotations = *cfg.Annotations\n\t}\n\treadOnlyHint := true\n\tannotations.ReadOnlyHint = &readOnlyHint\n\n\treturn Tool{\n\t\tBaseTool: tools.NewBaseTool(\n\t\t\tcfg,\n\t\t\tannotations,\n\t\t\ttools.Manifest{Description: cfg.Description, Parameters: allParameters.Manifest(), AuthRequired: cfg.AuthRequired},\n\t\t\tallParameters,\n\t\t),","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookerlistagents/lookerlistagents.go#L53-L89","documentation":"Config.Initialize for the lookerlistagents tool validates that a non-empty description was provided. The description becomes the tool's documentation surfaced to the LLM client, so a tool without one is rejected at configuration load time with this error naming the tool. This is a config-time validation failure — the server fails before any request is served.","triggerScenarios":"A tools.yaml defines a looker-list-agents tool without the description field (or sets it to an empty string), and the server calls cfg.Initialize while building the tool registry.","commonSituations":"Hand-writing YAML and omitting description; templating that emits an empty value; deleting a description during cleanup; environment substitution that resolves description to \"\"; a copy of another tool's config with the description accidentally removed.","solutions":["Add a non-empty description field to the looker-list-agents tool in the config YAML.","If using env/template substitution, verify the substituted value is not empty.","Restart/reload the server and confirm the tool registers without error."],"exampleFix":"// before (tools.yaml)\ntools:\n  list-agents:\n    kind: looker-list-agents\n    source: looker-prod\n\n// after\ntools:\n  list-agents:\n    kind: looker-list-agents\n    source: looker-prod\n    description: List Looker agents available to the authenticated user.","handlingStrategy":"validation","validationCode":"// before applying the config\nfor name, tool := range cfg.Tools {\n    if tool.Kind == \"looker-list-agents\" && strings.TrimSpace(tool.Description) == \"\" {\n        return fmt.Errorf(\"tool %q is missing required description\", name)\n    }\n}","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil && strings.Contains(err.Error(), \"description is required\") {\n    return fmt.Errorf(\"config error in tools.yaml: %w\", err)\n}","preventionTips":["Treat description as a mandatory field in all tool templates/snippets.","Run yaml schema validation (with required fields) in CI before deploying configs.","After env/template substitution, assert no interpolated field is empty.","Lint tools.yaml so every tool entry includes kind, source, and description."],"tags":["looker","configuration","validation","yaml"],"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"}