{"record":{"id":"6069a0ce36890e61","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-6069a0","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/singlestore/singlestoresql/singlestoresql.go","lineNumber":76,"sourceCode":"\tParameters         parameters.Parameters  `yaml:\"parameters\"`\n\tTemplateParameters parameters.Parameters  `yaml:\"templateParameters\"`\n\tAnnotations        *tools.ToolAnnotations `yaml:\"annotations,omitempty\"`\n}\n\n// validate interface\nvar _ tools.ToolConfig = Config{}\n\n// ToolConfigType returns the type of the tool configuration.\nfunc (cfg Config) ToolConfigType() string {\n\treturn resourceType\n}\n\n// Initialize sets up and returns a new Tool instance based on the provided configuration.\n// It processes tool parameters and constructs the necessary manifests for tool operation.\n// Returns an initialized Tool or an error if setup fails.\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, paramManifest, err := parameters.ProcessParameters(cfg.TemplateParameters, cfg.Parameters)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn Tool{\n\t\tBaseTool: tools.NewBaseTool(\n\t\t\tcfg,\n\t\t\ttools.GetAnnotationsOrDefault(cfg.Annotations, tools.NewDestructiveAnnotations),\n\t\t\ttools.Manifest{Description: cfg.Description, Parameters: paramManifest, AuthRequired: cfg.AuthRequired},\n\t\t\tallParameters,\n\t\t),\n\t}, nil\n}\n\n// validate interface","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/singlestore/singlestoresql/singlestoresql.go#L58-L94","documentation":"The singlestore-sql tool's Config.Initialize returns this error when the tool's `description` field is empty. Descriptions are mandatory because they appear in the tool's MCP manifest and guide LLM clients in tool selection; Toolbox refuses to initialize a tool without one. The error names the tool so the offending entry in tools.yaml is easy to find.","triggerScenarios":"Loading a config containing a `singlestore-sql` tool with no `description` key or an empty-string description, triggering `fmt.Errorf(\"description is required for tool %q\", cfg.Name)` in Initialize.","commonSituations":"Omitting description in minimal test configs; template/CI generation dropping the field; YAML structure mistakes (e.g. description nested under parameters or mis-indented) leaving cfg.Description empty.","solutions":["Add a descriptive `description:` string to the singlestore-sql tool entry.","Verify the description key is at the tool level with correct indentation.","Ensure any templated/env-substituted description resolves to a non-empty value."],"exampleFix":"# before\ntools:\n  my-sql-tool:\n    kind: singlestore-sql\n    source: singlestore-src\n# after\ntools:\n  my-sql-tool:\n    kind: singlestore-sql\n    source: singlestore-src\n    description: Run parameterized SQL queries against SingleStore.","handlingStrategy":"validation","validationCode":"tools:\n  my-sql-tool:\n    kind: singlestore-sql\n    source: singlestore-src\n    description: \"Run SQL against SingleStore\"  # required, non-empty","typeGuard":"func hasDescription(name, desc string) error {\n    if desc == \"\" {\n        return fmt.Errorf(\"tool %q is missing a description\", name)\n    }\n    return nil\n}","tryCatchPattern":"if err := toolbox.Start(ctx); err != nil {\n    if strings.Contains(err.Error(), \"description is required for tool\") {\n        log.Fatalf(\"fix tools.yaml: %v\", err)\n    }\n    log.Fatalf(\"toolbox failed: %v\", err)\n}","preventionTips":["Include a meaningful description in every tool template/scaffold.","Lint tools.yaml for required keys (name, kind, source, description) in CI.","Beware of mis-indented description keys — verify with `yq` after edits."],"tags":["configuration","validation","singlestore","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"}