{"record":{"id":"b96acb1a226f68ab","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-b96acb","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/looker/lookerconversationalanalytics/lookerconversationalanalytics.go","lineNumber":147,"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\tuserQueryParameter := parameters.NewStringParameter(\"user_query_with_context\", \"The user's question, potentially including conversation history and system instructions for context.\")\n\n\texploreRefsDescription := `An Array of at least one and up to 5 explore references like [{'model': 'MODEL_NAME', 'explore': 'EXPLORE_NAME'}]`\n\texploreRefsParameter := parameters.NewArrayParameter(\n\t\t\"explore_references\",\n\t\texploreRefsDescription,\n\t\tparameters.NewMapParameter(\n\t\t\t\"explore_reference\",\n\t\t\t\"An explore reference like {'model': 'MODEL_NAME', 'explore': 'EXPLORE_NAME'}\",\n\t\t\t\"\",\n\t\t),\n\t)\n\n\tparams := parameters.Parameters{userQueryParameter, exploreRefsParameter}\n\n\t// finish tool setup","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookerconversationalanalytics/lookerconversationalanalytics.go#L129-L165","documentation":"Config.Initialize for the Looker Conversational Analytics tool requires a non-empty Description field, since MCP tool manifests must advertise what the tool does. If Config.Name is set but Description is empty, Initialize refuses to build the tool and returns this error naming the tool.","triggerScenarios":"Declaring a looker-conversational-analytics tool in YAML with a name but omitting the description field, then starting the toolbox server.","commonSituations":"Hand-written tool configs missing the required description; templated config generation leaving description blank; copying a minimal config example that elides description.","solutions":["Add a non-empty description field to the tool's YAML config","Verify the config key is spelled 'description' at the correct nesting level","Check that your config loader isn't overriding/blanking the description","Validate the tool config before server startup"],"exampleFix":"// before\ntools:\n  my_tool:\n    kind: looker-conversational-analytics\n    name: my_tool\n// after\ntools:\n  my_tool:\n    kind: looker-conversational-analytics\n    name: my_tool\n    description: \"Answer questions about Looker data using conversational analytics\"","handlingStrategy":"validation","validationCode":"// config check before server start\nif cfg.Description == \"\" {\n\treturn fmt.Errorf(\"tool %q requires a description\", cfg.Name)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include a description for every tool in YAML configs","Run config validation/linting before deploying the server","Use config templates that default descriptions to non-empty placeholders"],"tags":["looker","config","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"}