{"record":{"id":"e5cd8c52ecc1456d","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-e5cd8c","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/cloudhealthcare/cloudhealthcarefhirpatienteverything/cloudhealthcarefhirpatienteverything.go","lineNumber":75,"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\tparams := buildParams(false)\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\n}\n\n// validate interface\nvar _ tools.Tool = Tool{}\n\ntype Tool struct {\n\ttools.BaseTool[Config]","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/cloudhealthcare/cloudhealthcarefhirpatienteverything/cloudhealthcarefhirpatienteverything.go#L57-L93","documentation":"cloudhealthcarefhirpatienteverything.Config.Initialize requires a non-empty description; like the other tools in this repo the description is authored by the user in tools.yaml and cannot be defaulted. An empty value stops tool construction.","triggerScenarios":"A cloud-healthcare-fhir-patient-everything tool entry in tools.yaml with no description field or an empty string value.","commonSituations":"Omitting description in a quickstart-style minimal config; YAML anchors or templating blanking the field; key typo leaving the struct field zero-valued.","solutions":["Add a meaningful non-empty description to the tool's yaml block","Verify the key is exactly 'description' and non-empty","Check anchors/overrides don't reset it to \"\""],"exampleFix":"// before\n  patient-everything:\n    kind: cloud-healthcare-fhir-patient-everything\n    source: healthcare-src\n// after\n  patient-everything:\n    kind: cloud-healthcare-fhir-patient-everything\n    source: healthcare-src\n    description: \"Retrieve all FHIR resources for a patient via Patient/$everything\"","handlingStrategy":"validation","validationCode":"func checkDescription(cfg map[string]any) error {\n\td, _ := cfg[\"description\"].(string)\n\tif d == \"\" { return errors.New(\"description is required\") }\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always author description for patient-everything tool entries","Lint tools.yaml keys to catch misspellings","Boot the server locally to validate config before deploy"],"tags":["config","validation","cloud-healthcare"],"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"}