Skip to main content

Module profile

Module profile 

Source
Expand description

v0.6.4-001 — Profile resolution for the MCP tool surface.

A profile is a set of tool families (Family) that the MCP server advertises in its tools/list response. v0.6.4 collapses the default surface from 43 tools (full) to 5 (core) so eager-loading harnesses stop pre-paying ~6,000 input tokens of tool schemas per request. The 38 tools outside core remain reachable via runtime expansion through memory_capabilities --include-schema family=<name> (Track C — v0.6.4-006), so no functionality is lost; only the eager prefix cost goes away.

§Resolution order

CLI flag > AI_MEMORY_PROFILE env > [mcp].profile config > "core".

clap natively handles “CLI > env” with #[arg(env = "...")], so the daemon-runtime side only needs to call [AppConfig::effective_profile] with the resolved CLI/env value (already merged by clap) plus the config-file value (read by serde).

§Profile vocabulary

  • core — 7 tools, the new v0.6.4 default (v0.7 B1 added memory_load_family; v0.7 B2 added memory_smart_load). Always loaded.
  • graph — adds the 11 KG/entity/replay/verify/find_paths tools. ~18 tools.
  • admin — adds lifecycle (6) + governance (8). ~21 tools.
  • power — adds the 8 LLM-augmented + operator tools (consolidate, auto_tag, …, plus the v0.7 K7 subscription-reliability pair). ~15 tools.
  • full — every family. 74 advertised entries at v0.7.0 (73 callable “memory tools” + the always-on memory_capabilities bootstrap; Profile::full().expected_tool_count() is the canonical assertion).
  • custom — comma-separated family list (core,graph,archive …). core is implicitly added if missing — there’s no profile that ships less than the 7 core tools at v0.7.0 (the original 5 + memory_load_family + memory_smart_load).

§Custom-profile parsing edge cases

Documented in this RFC + pinned by unit tests:

  • empty string → Profile::core() (default)
  • core,core → dedupe silently
  • core,xyzProfileParseError::UnknownFamily("xyz") listing every valid family name
  • mixed-case (Core) → ProfileParseError::CaseMismatch. Profiles are case-sensitive lowercase. Rejecting mixed case prevents Profile vs profile config-file divergence from creating two different surfaces in production.
  • whitespace-only token (core, ,graph) → silently skipped
  • core,fullProfile::full() (full subsumes everything; not an error)
  • duplicates across the named-then-custom path (full,core) → also resolves to full.

Structs§

Profile
A resolved tool profile — the set of families to register on the MCP server.

Enums§

Family
A tool family. Source-anchored at crate::mcp::registry::tool_definitions() 2026-05-05. Counts must sum to 51 (the v0.6.3.1 baseline of 43 + v0.7.0 I4 memory_replay + v0.7 H4 memory_verify (both in Family::Graph) + v0.7 B1 memory_load_family and v0.7 B2 memory_smart_load in Family::Core + v0.7 K7 memory_subscription_replay and memory_subscription_dlq_list in Family::Power + v0.7 J7 memory_find_paths in Family::Graph + v0.7 K8 memory_quota_status in Family::Power).
ProfileParseError
Errors produced by Profile::parse / Family::from_str.

Constants§

ALWAYS_ON_TOOLS
Tool names that are loaded in every profile, regardless of which families it includes. v0.6.4 reserves memory_capabilities as the always-on bootstrap so the runtime-discovery dance works out of the box on --profile core. Per RFC S27 and the v0.6.4-002 acceptance criteria.