{"record":{"id":"5cf9afb8b3390f82","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-5cf9af","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/lookergetconnectiontables/lookergetconnectiontables.go","lineNumber":71,"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\tconnParameter := parameters.NewStringParameter(\"conn\", \"The connection containing the tables.\")\n\tdbParameter := parameters.NewStringParameter(\"db\", \"The optional database to search\", parameters.WithStringRequired(false))\n\tschemaParameter := parameters.NewStringParameter(\"schema\", \"The schema containing the tables.\")\n\tparams := parameters.Parameters{connParameter, dbParameter, schemaParameter}\n\n\t// finish tool setup\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","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/looker/lookergetconnectiontables/lookergetconnectiontables.go#L53-L89","documentation":"Config validation error from looker-get-connection-tables: Initialize rejects any tool config whose `description` field is empty. Descriptions are mandatory because they are shown to the LLM consuming the MCP tool, so a Looker tool without one is considered misconfigured and the server refuses to build it.","triggerScenarios":"Calling Config.Initialize (during server/toolbox startup) with a looker-get-connection-tables tool definition that omits the description field or sets it to \"\" in the YAML/JSON config.","commonSituations":"Hand-authoring tools.yaml and forgetting the description key; templated configs where an empty variable renders as an empty string; copy-pasting a minimal tool block stripped of the description; a loader that drops empty fields.","solutions":["Add a non-empty `description:` to the looker-get-connection-tables tool entry in your config.","Check that any templating/variable substitution actually fills the description (not an empty default).","Validate the config before startup (e.g. a YAML schema check or dry-run).","Copy the canonical tool example from the Looker docs, which includes a description."],"exampleFix":"# before\ntools:\n  looker-get-connection-tables:\n    kind: looker-get-connection-tables\n    source: my-looker\n# after\ntools:\n  looker-get-connection-tables:\n    kind: looker-get-connection-tables\n    source: my-looker\n    description: Retrieves the list of tables in a Looker connection, optionally filtered by database and schema.","handlingStrategy":"validation","validationCode":"// config check before loading\ncfg, _ := readToolConfig(path)\nif cfg.Description == \"\" {\n    return fmt.Errorf(\"tool %s: description is required\", cfg.Name)\n}","typeGuard":"func hasDescription(c lookergetconnectiontables.Config) bool { return c.Description != \"\" }","tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil {\n    log.Fatalf(\"invalid looker-get-connection-tables config: %v\", err)\n}","preventionTips":["Always include a description for every tool block in tools.yaml.","Lint configs for empty required string fields before deployment.","Beware templating variables that can expand to empty strings.","Copy canonical examples from the Looker integration docs."],"tags":["go","looker","config-validation","missing-field"],"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"}