Structured fact memory MCP server — SQLite + FTS5, trust scoring, entity graph, bilingual retrieval for Claude Code & Codex
Two tools with schemas visible in source. fact_store has a complex, multi-action design with 13 enum actions and 11 optional parameters covering search, add, update, remove, and reasoning operations. Descriptions are present but lengthy (Chinese text, 400+ chars) and lack LLM-optimized structure. fact_feedback is minimal. Schemas use Zod with type definitions, but parameter descriptions are sparse or missing for many fields. No output schema documented. No error handling guidance. Tool names lack action verbs (fact_store is a noun; fact_feedback is vague). Composition violates single-responsibility: fact_store bundles search, add, update, delete, reasoning, and learning into one tool.
Rate a fact as helpful or unhelpful to adjust its trust score
结构化事实记忆系统(SQLite+FTS5 索引)。支持读写。 操作: - search — 关键词查找 - probe — 实体探测:关于某人/某事的所有事实 - related — 实体关联 - reason — 组合推理:同时关联多个实体的事实 - contradict — 矛盾检测 - list — 浏览事实 - add — 添加新事实(自动去重,相似则更新,单条 ≤300 字) - update — 更新已有事实 - remove — 删除事实 - auto_observe — 自动保存工作流/偏好记忆(AI 完成任务后调用,trust=0.3 起步) - cleanup — 扫描超长 fact 报告 写入时先 search 检查是否已存在相似事实。单条 content 不超过 300 字,聚焦一个主题。
fact_store violates single-responsibility principle: bundles 13 distinct operations (search, add, update, remove, probe, related, reason, contradict, list, learn, audit, dream, cleanup, auto_observe) into one tool. LLMs cannot reason about when to call it vs. alternatives.
Tool names lack action verbs. 'fact_store' is a noun (should be 'search_facts', 'add_fact', 'update_fact', etc.). 'fact_feedback' is vague, does it rate, score, or adjust trust? Should be 'rate_fact_trust' or 'adjust_fact_confidence'.
No output schema documented. fact_store returns JSON with factId, display, category, trustScore, score, but this is inferred from code, not declared in tool definition. LLMs cannot plan downstream calls without knowing response structure.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 39 | 2026-07-28+ | v2 |
Parameter descriptions are sparse or missing. 'content' has a 50-char description; 'query', 'entity', 'entities', 'fact_id', 'tags', 'trust_delta', 'min_trust', 'limit' lack actionable guidance on format, range, or constraints. Baseline: 100% of A+ tools have descriptions for every param.
No error handling guidance. Code returns JSON errors (e.g. 'Missing required argument: content', 'empty content', 'error') but does not guide LLM on recovery. Should include 'Try calling search_facts() first' or 'Ensure content is 1-300 characters'.