{"record":{"id":"8991d76a55c85449","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-8991d7","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/cloudstorage/cloudstoragemoveobject/cloudstoragemoveobject.go","lineNumber":72,"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\tBucket           *string                `yaml:\"bucket,omitempty\"`\n}\n\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\tif cfg.Bucket != nil && *cfg.Bucket == \"\" {\n\t\treturn nil, fmt.Errorf(\"bucket cannot be empty for tool %q\", cfg.Name)\n\t}\n\n\tsourceObjectParam := parameters.NewStringParameter(sourceObjectKey, \"Full source object name (path) within the bucket, e.g. 'path/to/file.txt'.\")\n\tdestinationObjectParam := parameters.NewStringParameter(destinationObjectKey, \"Full destination object name (path) within the same bucket, e.g. 'path/to/file.txt'.\")\n\tallParameters := parameters.Parameters{}\n\tif cfg.Bucket == nil {\n\t\tallParameters = append(allParameters, parameters.NewStringParameter(bucketKey, \"Name of the Cloud Storage bucket containing the object to move.\"))\n\t}\n\tallParameters = append(allParameters, sourceObjectParam, destinationObjectParam)\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: allParameters.Manifest(), AuthRequired: cfg.AuthRequired},","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/cloudstorage/cloudstoragemoveobject/cloudstoragemoveobject.go#L54-L90","documentation":"Thrown by cloudstorage-move-object Config.Initialize when the tool config has no description. The description is required because it is published to the LLM through the MCP tool manifest, and the toolbox rejects building the tool without it.","triggerScenarios":"A cloudstorage-move-object tool entry in tools.yaml omits 'description' or sets it to \"\"; Initialize runs at config load/server start.","commonSituations":"Writing a new move-object tool quickly and skipping the description; autogenerated or templated configs with empty description variables.","solutions":["Add a meaningful non-empty 'description' to the tool config","Check template interpolation so the description is not empty after rendering","Reload the server to confirm the config now validates"],"exampleFix":"// before\n  move-object:\n    kind: cloudstorage-move-object\n    source: my-gcs\n// after\n  move-object:\n    kind: cloudstorage-move-object\n    source: my-gcs\n    description: Move or rename an object within a Cloud Storage bucket","handlingStrategy":"validation","validationCode":"if cfg.Description == \"\" {\n    return fmt.Errorf(\"tool %q: description must be set in tools.yaml\", cfg.Name)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Template every tool block with a description placeholder filled at generation time","Run config validation in CI before deploying","Review YAML diffs for deleted description lines"],"tags":["go","configuration","mcp-toolbox","cloud-storage","validation"],"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"}