Zero-dependency MCP server for AI long-term memory using hybrid architecture: AM body (Markdown files) + thin CEMA index (SQLite). Provides deterministic, stateless memory retrieval and writing tools.
HMA server has well-structured schemas and detailed descriptions, but suffers from critical naming and composition issues. Tool names lack clear action verbs (memory_write, memory_query are acceptable but memory_query_anchors and memory_resolve are vague). Descriptions are lengthy (200-400+ chars) and domain-specific but often bury actionable guidance. Parameters are heavily documented with constraints, but many descriptions are in Chinese, reducing LLM accessibility. No output schemas are documented. Error handling is mentioned in descriptions but not formalized. The server exposes complex internal concepts (QueryEnvelope, ENVELOPE_VIOLATION, corpus_missing_entity) that should be abstracted. Five tools operate on overlapping concerns (query, query_anchors, resolve) without clear composition guidance.
确定性无状态检索:在 id/title/alias/tag/summary 上做关键词匹配,返回按确定性规则排序的 Top-K 候选(命中唯一 ID)。不依赖热度/权重。
锚点层细粒度召回:在事件包的 anchors 子事件锚点上做关键词匹配,返回命中的子事件(包ID + 锚点标题 + 摘要 + 定位 + 分数)。用于故事包/长正文按剧情节点召回——当 memory_query 命中率低时,anchors 往往能把内容词召回(如「示例设定」「示例信物」「纽约之战」)。
按小标题精准读取事件包正文的某一段(而非整包),节省上下文窗口。配合 memory_query_anchors 使用:先 query_anchors 拿到命中的锚点 Chapter 标题,再用本工具按该标题取正文。heading 为正文里 ## / ### 小标题的片段(包含匹配),可直接用 query_anchors 返回的 loc 值(它即 Chapter 标题,锚点无独立 locator 字段)。
召回消歧入口(B 类 resolver):在确定性关键词召回之上做实体歧义判定——命中≥2 实体时澄清(亮出各候选独有弧段让用户指认),否则直接返回 Top-K。multihop=true 时先沿 linked 双向 BFS 扩簇(多跳召回)再跑歧义门;keywords 可传入 AI 解析出的复合实体词,触发 corpus_missing_entity 硬拒答闸。这是 linked-BFS + 歧义门机制复用后的生产级统一入口。
写/改一个事件包:原子写 .md(权威源)+ 确定性 upsert 索引。id 为相对 memory/ 的复合路径(不含 .md,如 原创角色/示例角色/demo-base);id 存在则覆盖更新。四要素 person/location/topic 为 {规范名:[变体]} 字典(别名/代号/同义词一律进变体数组,无独立 aliases/features 字段);anchors 仅{Chapter,about,keywords}(无 tags/locator);时间用 pkage_created/pkage_updated,事件时间用 event_date(YYYY-MM-DD / YYYY-YYYY / '—')。不传则四要素留空、anchors 由引擎按 ## 派生。
No output schemas documented. LLMs cannot predict response structure, forcing them to guess at field names and types for downstream tool chaining. memory_query, memory_query_anchors, and memory_resolve all lack documented return types.
Three query tools (memory_query, memory_query_anchors, memory_resolve) overlap significantly in purpose and parameters. Unclear when to use each. memory_resolve appears to be a wrapper combining query + disambiguation, but this composition is not documented.
Descriptions expose internal implementation details (QueryEnvelope, ENVELOPE_VIOLATION, corpus_missing_entity, BM25, linked-BFS) that should be abstracted. LLMs should not need to understand the engine's internals to use the tool.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 49 | 2026-07-28+ | v2 |
Parameter descriptions are primarily in Chinese, reducing accessibility for non-Chinese-speaking LLMs and developers. Descriptions should be in English for maximum compatibility.
Required parameters like 'keywords' and 'mode' in query tools lack clear guidance on when/how to populate them. 'mode' enum values (single/multi/enumerate) are not self-documenting. LLMs will struggle to classify queries correctly.