TencentCloud/TencentDB-Agent-Memory · error · ParamRegistryError

Module '${mod.module}', param '${param.param_name}': descrip

Error message

Module '${mod.module}', param '${param.param_name}': description is required

What it means

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.

Source

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

      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)) {
        throw new ParamRegistryError(
          `Module '${mod.module}': duplicate param_name '${param.param_name}'`,
        );
      }
      seenParams.add(param.param_name);

      if (param.param_value === undefined || param.param_value === null) {
        throw new ParamRegistryError(
          `Module '${mod.module}', param '${param.param_name}': param_value is required`,
        );
      }
      if (!param.description) {
        throw new ParamRegistryError(
          `Module '${mod.module}', param '${param.param_name}': description is required`,
        );
      }
      if (
        !Array.isArray(param.allowed_scopes) ||
        param.allowed_scopes.length === 0
      ) {
        throw new ParamRegistryError(
          `Module '${mod.module}', param '${param.param_name}': allowed_scopes must be non-empty array`,
        );
      }
      for (const scope of param.allowed_scopes) {
        if (scope !== "global" && scope !== "user") {
          throw new ParamRegistryError(
            `Module '${mod.module}', param '${param.param_name}': invalid scope '${scope}'`,
          );
        }
      }

View on GitHub (pinned to 3efcd317b8)

Solutions

  1. Write a clear description string explaining the param's purpose and units
  2. Restore the description if a tool stripped it
  3. Add a schema/lint rule requiring non-empty description on every param before load

Example fix

// before
{ "param_name": "max_entries", "param_value": 1000, "allowed_scopes": ["global"] }
// after
{ "param_name": "max_entries", "param_value": 1000, "description": "Maximum number of cache entries before eviction", "allowed_scopes": ["global"] }
Defensive patterns

Strategy: validation

Validate before calling

for (const m of data.modules) {
  for (const p of m.params ?? []) {
    if (typeof p.description !== 'string' || p.description.trim() === '') {
      throw new Error(`${m.module}.${p.param_name} missing description`);
    }
  }
}

Try / catch

try {
  const registry = await loadParamRegistry();
} catch (e) {
  if (e instanceof ParamRegistryError && e.message.includes('description is required')) {
    console.error('Add a description to the named param:', e.message);
  } else throw e;
}

Prevention

When it happens

Trigger: A param object in data.modules[i].params omits description, has description: "", or description: null during loadParamRegistry.

Common situations: Adding params quickly and deferring documentation; automated exports that drop description fields; edits that cleared the field.

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/fac0d8eeee3dc0d9. Report an issue: GitHub.