TencentCloud/TencentDB-Agent-Memory · error · ParamRegistryError

Module '${mod.module}' must have a description

Error message

Module '${mod.module}' must have a description

What it means

Every module entry in the registry must carry a non-empty 'description'. buildRegistry throws this error when mod.description is missing, null, or an empty string. The description is used for documentation and introspection of the parameter registry.

Source

Thrown at MemoryCore/src/metadata/config/param-registry.ts:97

  const registry: ConfigParamRegistry = new Map();
  const seenModules = new Set<string>();

  for (const mod of data.modules) {
    if (!mod.module || typeof mod.module !== "string") {
      throw new ParamRegistryError("Each module entry must have a 'module' string field");
    }
    if (!MODULE_RE.test(mod.module)) {
      throw new ParamRegistryError(
        `Invalid module name '${mod.module}': must match ${MODULE_RE}`,
      );
    }
    if (seenModules.has(mod.module)) {
      throw new ParamRegistryError(`Duplicate module '${mod.module}'`);
    }
    seenModules.add(mod.module);

    if (!mod.description) {
      throw new ParamRegistryError(`Module '${mod.module}' must have a description`);
    }
    if (!Array.isArray(mod.params) || mod.params.length === 0) {
      throw new ParamRegistryError(`Module '${mod.module}' must have at least one param`);
    }

    const seenParams = new Set<string>();
    for (const param of mod.params) {
      if (!param.param_name || typeof param.param_name !== "string") {
        throw new ParamRegistryError(
          `Module '${mod.module}': each param must have a 'param_name' string`,
        );
      }
      if (!PARAM_NAME_RE.test(param.param_name)) {
        throw new ParamRegistryError(
          `Module '${mod.module}': invalid param_name '${param.param_name}': must match ${PARAM_NAME_RE}`,
        );
      }
      if (seenParams.has(param.param_name)) {

View on GitHub (pinned to 3efcd317b8)

Solutions

  1. Add a meaningful description string to the module entry in the registry file
  2. If a tool generated the entry, re-run it with description output enabled or fill it in manually
  3. Validate the registry file against a JSON schema requiring a non-empty description before loading

Example fix

// before
{ "module": "cache", "params": [ ... ] }
// after
{ "module": "cache", "description": "Tunable cache parameters (size, TTL)", "params": [ ... ] }
Defensive patterns

Strategy: validation

Validate before calling

for (const m of data.modules) {
  if (typeof m.description !== 'string' || m.description.trim() === '') {
    throw new Error(`module ${m.module} is missing a description`);
  }
}

Try / catch

try {
  const registry = await loadParamRegistry();
} catch (e) {
  if (e instanceof ParamRegistryError && e.message.includes('must have a description')) {
    console.error('Add a description to the module named in the error');
  } else throw e;
}

Prevention

When it happens

Trigger: A data.modules[i] entry has no description field, description is empty (""), or it is null/undefined when loadParamRegistry builds the registry.

Common situations: Hand-writing a new module block and forgetting the description field; a migration script that copies entries but drops unknown fields; JSON with "description": "" after a careless edit.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of TencentCloud/TencentDB-Agent-Memory@3efcd317b8 (2026-09-01). Data as JSON: /api/errors/0a744d7b91364dfb. Report an issue: GitHub.