{"record":{"id":"6267e55b814952b9","repo":"googleapis/mcp-toolbox","slug":"description-is-required-for-tool-q-6267e5","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/arcadedb/arcadedbexecutecypher/arcadedbexecutecypher.go","lineNumber":66,"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\tReadOnly         bool                   `yaml:\"readOnly\"`\n\tAnnotations      *tools.ToolAnnotations `yaml:\"annotations,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\n\tcypherParameter := parameters.NewStringParameter(\"cypher\", \"The cypher to execute.\")\n\tqueryParamsParameter := parameters.NewMapParameter(\n\t\t\"params\",\n\t\t\"Optional query parameters to use with the cypher statement.\",\n\t\t\"\",\n\t\tparameters.WithMapDefault(map[string]any{}),\n\t)\n\tdryRunParameter := parameters.NewBooleanParameter(\n\t\t\"dry_run\",\n\t\t\"If set to true, the query will be validated and information about the execution \"+\n\t\t\t\"will be returned without running the query. Defaults to false.\",\n\t\tparameters.WithBooleanDefault(false),\n\t)\n\tparams := parameters.Parameters{cypherParameter, queryParamsParameter, dryRunParameter}\n\n\tallParameters, paramManifest, err := parameters.ProcessParameters(nil, params)","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/googleapis/mcp-toolbox/blob/8cc6e09de2ad7b8bffc77751799585a1401a48eb/internal/tools/arcadedb/arcadedbexecutecypher/arcadedbexecutecypher.go#L48-L84","documentation":"Initialize() for the arcadedb-execute-cypher tool requires a non-empty description, which the LLM uses to select the tool. An empty cfg.Description aborts tool construction with this error naming the tool.","triggerScenarios":"Defining an arcadedb-execute-cypher tool without a description field (or empty string) and initializing it at server startup.","commonSituations":"Omitting description when hand-writing tools.yaml; environment-variable interpolation yielding empty; copied tool blocks stripped down too far.","solutions":["Add a description field describing what the cypher execution tool does.","Fix interpolation so the description resolves to non-empty text.","Re-run the server after adding it — the error occurs only at config load, not per-request."],"exampleFix":"// before\ntools:\n  run-cypher:\n    kind: arcadedb-execute-cypher\n    source: my-arcadedb\n// after\ntools:\n  run-cypher:\n    kind: arcadedb-execute-cypher\n    source: my-arcadedb\n    description: Execute a Cypher query against the ArcadeDB database.","handlingStrategy":"validation","validationCode":"if cfg.Description == \"\" {\n    return errors.New(\"arcadedb-execute-cypher requires a non-empty description\")\n}\ntool, err := cfg.Initialize(ctx)","typeGuard":null,"tryCatchPattern":"tool, err := cfg.Initialize(ctx)\nif err != nil {\n    if strings.Contains(err.Error(), \"description is required\") {\n        // supply a description and re-initialize\n    }\n    return err\n}","preventionTips":["Treat description as a required field in your config authoring checklist.","Lint tools.yaml so every tool entry has non-empty name, source, description, kind.","Fail fast at startup: server init surfaces this before serving."],"tags":["configuration","validation","missing-field","arcadedb"],"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"}