{"record":{"id":"1e48d1836157a0de","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-1e48d1","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/cloudhealthcarefhirfetchpage/cloudhealthcarefhirfetchpage.go","lineNumber":69,"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\turlParameter := parameters.NewStringParameter(pageURLKey, \"The full URL of the FHIR page to fetch. This would be the value of `Bundle.entry.link.url` field within the response returned from FHIR search or FHIR patient everything operations.\")\n\tallParameters := parameters.Parameters{urlParameter}\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: allParameters.Manifest(), AuthRequired: cfg.AuthRequired},\n\t\t\tallParameters,\n\t\t),\n\t}, nil\n}\n\n// validate interface\nvar _ tools.Tool = Tool{}\n","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/cloudhealthcare/cloudhealthcarefhirfetchpage/cloudhealthcarefhirfetchpage.go#L51-L87","documentation":"cloudhealthcarefhirfetchpage.Config.Initialize requires a non-empty description before building the tool; this tool does not supply a default description, so the user must provide one in tools.yaml. Failure aborts tool creation with the tool's name in the message.","triggerScenarios":"A cloud-healthcare-fhir-fetch-page tool entry in tools.yaml missing the description field or with description: \"\".","commonSituations":"Minimal config examples copied without the description line; templates/anchors leaving the field empty; misspelled key so the struct field stays empty.","solutions":["Add a non-empty description to the tool's yaml block","Verify exact key spelling 'description' with no empty anchors","Re-run the server to confirm the tool loads"],"exampleFix":"// before\n  fetch-page:\n    kind: cloud-healthcare-fhir-fetch-page\n    source: fhir-src\n// after\n  fetch-page:\n    kind: cloud-healthcare-fhir-fetch-page\n    source: fhir-src\n    description: \"Fetch a page of FHIR resources using a bundle link URL\"","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":["Include description in every cloud-healthcare tool definition","Validate tools.yaml in CI by starting the toolbox once"],"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"}