{"record":{"id":"e146f65736096e8d","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-e146f6","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/falkordb/falkordbcypher/falkordbcypher.go","lineNumber":69,"sourceCode":"type Config struct {\n\ttools.ConfigBase `yaml:\",inline\"`\n\tType             string                 `yaml:\"type\" validate:\"required\"`\n\tSource           string                 `yaml:\"source\" validate:\"required\"`\n\tStatement        string                 `yaml:\"statement\" validate:\"required\"`\n\tParameters       parameters.Parameters  `yaml:\"parameters\"`\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\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: cfg.Parameters.Manifest(), AuthRequired: cfg.AuthRequired},\n\t\t\tcfg.Parameters,\n\t\t),\n\t}, nil\n}\n\n// validate interface\nvar _ tools.Tool = Tool{}\n\ntype Tool struct {\n\ttools.BaseTool[Config]\n}","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/falkordb/falkordbcypher/falkordbcypher.go#L51-L87","documentation":"Config.Initialize for the falkordb-cypher tool rejects the tool when `cfg.Description` is empty. The description is mandatory because it becomes the tool manifest shown to LLM clients; without it Initialize returns an error and the tool cannot be registered.","triggerScenarios":"A tools.yaml entry with kind `falkordb-cypher` that has no `description` key or sets it to the empty string.","commonSituations":"Writing a first FalkorDB tools.yaml from memory and omitting description; a YAML alias/anchor resolving to an empty value; batch-generated configs where the description column was blank.","solutions":["Add a meaningful non-empty `description` to the falkordb-cypher tool entry","Confirm the description key is correctly indented under the tool, not the source section","Avoid values that YAML coerces oddly; quote the description text","Reload and confirm the tool loads without the Initialize error"],"exampleFix":"// before (tools.yaml)\ntools:\n  cypher:\n    kind: falkordb-cypher\n    source: falkordb\n// after\ntools:\n  cypher:\n    kind: falkordb-cypher\n    source: falkordb\n    description: Executes a Cypher query on the FalkorDB graph database.","handlingStrategy":"validation","validationCode":"for name, t := range cfg.Tools {\n    if strings.TrimSpace(t.Description) == \"\" {\n        return fmt.Errorf(\"tool %q (falkordb-cypher) needs a description\", name)\n    }\n}","typeGuard":"func descriptionPresent(t ToolEntry) bool { return t.Description != nil && *t.Description != \"\" }","tryCatchPattern":"if _, err := cfg.Initialize(ctx); err != nil {\n    if strings.Contains(err.Error(), \"description is required\") {\n        // point the user at the offending tool name in the message\n        return configFixError{err}\n    }\n    return err\n}","preventionTips":["Treat description as a required field in every tool template","Run a YAML linter with a custom schema requiring tool.description","Avoid YAML anchors that may resolve to empty strings","Capture the error's %q tool name to locate the offending entry quickly"],"tags":["go","configuration","validation","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"}