{"record":{"id":"fac0d8eeee3dc0d9","repo":"TencentCloud/TencentDB-Agent-Memory","slug":"module-mod-module-param-param-param-name-fac0d8","errorCode":null,"errorMessage":"Module '${mod.module}', param '${param.param_name}': description is required","messagePattern":"Module '(.+?)', param '(.+?)': description is required","errorType":"validation","errorClass":"ParamRegistryError","httpStatus":null,"severity":"error","filePath":"MemoryCore/src/metadata/config/param-registry.ts","lineNumber":128,"sourceCode":"      if (!PARAM_NAME_RE.test(param.param_name)) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}': invalid param_name '${param.param_name}': must match ${PARAM_NAME_RE}`,\n        );\n      }\n      if (seenParams.has(param.param_name)) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}': duplicate param_name '${param.param_name}'`,\n        );\n      }\n      seenParams.add(param.param_name);\n\n      if (param.param_value === undefined || param.param_value === null) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}', param '${param.param_name}': param_value is required`,\n        );\n      }\n      if (!param.description) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}', param '${param.param_name}': description is required`,\n        );\n      }\n      if (\n        !Array.isArray(param.allowed_scopes) ||\n        param.allowed_scopes.length === 0\n      ) {\n        throw new ParamRegistryError(\n          `Module '${mod.module}', param '${param.param_name}': allowed_scopes must be non-empty array`,\n        );\n      }\n      for (const scope of param.allowed_scopes) {\n        if (scope !== \"global\" && scope !== \"user\") {\n          throw new ParamRegistryError(\n            `Module '${mod.module}', param '${param.param_name}': invalid scope '${scope}'`,\n          );\n        }\n      }","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/3efcd317b84146d6a08518ac0f7ee7c8a8d200ec/MemoryCore/src/metadata/config/param-registry.ts#L110-L146","documentation":"Each param also requires a non-empty 'description'. buildRegistry throws this when param.description is missing, empty, or null. Descriptions document what the parameter controls for consumers of the registry.","triggerScenarios":"A param object in data.modules[i].params omits description, has description: \"\", or description: null during loadParamRegistry.","commonSituations":"Adding params quickly and deferring documentation; automated exports that drop description fields; edits that cleared the field.","solutions":["Write a clear description string explaining the param's purpose and units","Restore the description if a tool stripped it","Add a schema/lint rule requiring non-empty description on every param before load"],"exampleFix":"// before\n{ \"param_name\": \"max_entries\", \"param_value\": 1000, \"allowed_scopes\": [\"global\"] }\n// after\n{ \"param_name\": \"max_entries\", \"param_value\": 1000, \"description\": \"Maximum number of cache entries before eviction\", \"allowed_scopes\": [\"global\"] }","handlingStrategy":"validation","validationCode":"for (const m of data.modules) {\n  for (const p of m.params ?? []) {\n    if (typeof p.description !== 'string' || p.description.trim() === '') {\n      throw new Error(`${m.module}.${p.param_name} missing description`);\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  const registry = await loadParamRegistry();\n} catch (e) {\n  if (e instanceof ParamRegistryError && e.message.includes('description is required')) {\n    console.error('Add a description to the named param:', e.message);\n  } else throw e;\n}","preventionTips":["Write the description when adding the param, not as a follow-up","Require description in your registry JSON schema","Review generated params for stripped description fields"],"tags":["configuration","validation","missing-field"],"backgroundTag":"missing-required-argument","analyzedSha":"3efcd317b84146d6a08518ac0f7ee7c8a8d200ec","analyzedAt":"2026-09-01T05:44:22.276Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}