rohitg00/agentmemory · info

Unknown --tools value "${toolsMode}" (valid: all, core); fal

Error message

Unknown --tools value "${toolsMode}" (valid: all, core); falling back to all.

What it means

The CLI parses --tools <mode> at startup (src/cli.ts:252) and only accepts 'all' or 'core'. Any other value logs 'Unknown --tools value "<v>" (valid: all, core); falling back to all.' as a warning, then still assigns the value to AGENTMEMORY_TOOLS (which the tool registry treats as the 'all' default). Non-fatal; the process continues.

Source

Thrown at src/cli.ts:252

                               (default 30). Long values overcount, short values undercount.

Quick start:
  npx @agentmemory/agentmemory          # start with local iii-engine or Docker
  npx @agentmemory/agentmemory demo     # see semantic recall in 30 seconds
  npx @agentmemory/agentmemory doctor   # diagnose config + feature flags
  npx @agentmemory/agentmemory status   # health + memory count + flags
  npx @agentmemory/agentmemory upgrade  # upgrade agentmemory + iii runtime
  npx @agentmemory/agentmemory mcp      # standalone MCP server (no engine)
  npx @agentmemory/mcp                  # same as above (shim package)
`);
  process.exit(0);
}

const toolsIdx = args.indexOf("--tools");
if (toolsIdx !== -1 && args[toolsIdx + 1]) {
  const toolsMode = args[toolsIdx + 1]!;
  if (toolsMode !== "all" && toolsMode !== "core") {
    p.log.warn(
      `Unknown --tools value "${toolsMode}" (valid: all, core); falling back to all.`,
    );
  }
  process.env["AGENTMEMORY_TOOLS"] = toolsMode;
}

const URL_CLIENT_COMMANDS = new Set(["status", "doctor", "mcp"]);
let hasExplicitLocalPortOverride = false;
let selectedInstance = 0;

function cliArgValue(name: string): string | undefined {
  const inline = args.find((arg) => arg.startsWith(`${name}=`));
  if (inline) return inline.slice(name.length + 1);
  const index = args.indexOf(name);
  return index === -1 ? undefined : args[index + 1];
}

const portValue = cliArgValue("--port");

View on GitHub (pinned to e04ba88819)

Solutions

  1. Use --tools all or --tools core (exact lowercase spelling).
  2. Fix the value in whatever passes it: the MCP registration config, hook script, or shell alias.
  3. Remove the --tools flag entirely to use the default.
  4. Verify the current valid set in the CLI help (agentmemory --help) if upgrading from an older version.

Example fix

// before
agentmemory serve --tools minimal
// after
agentmemory serve --tools core
Defensive patterns

Strategy: validation

Validate before calling

const TOOLS_MODES = ["all", "core"] as const;
const mode = process.argv.find(v => TOOLS_MODES.includes(v as any));
if (!mode) console.warn("--tools must be 'all' or 'core'");

Type guard

const isToolsMode = (v: unknown): v is "all" | "core" =>
  v === "all" || v === "core";

Prevention

When it happens

Trigger: Running the CLI or a generated config with --tools minimal / default / visible / a typo like 'cores' or 'AL ', or a stale config from an older version that accepted different mode names.

Common situations: Users guessing mode names after reading about AGENTMEMORY_TOOLS=all; copy-pasted configs from other tools that use 'core'/'extended' vocabularies; outdated documentation or hook scripts embedding an old value.

Related errors


AI-assisted analysis of rohitg00/agentmemory@e04ba88819 (2026-08-30). Data as JSON: /api/errors/fabba4613ffa52ec. Report an issue: GitHub.