AI-MemoryHub MCP Server
AI记忆中枢(AI-MemoryHub)
제로 의존성, 모델 무관 AI Agent 장기 기억 시스템: Markdown 본문을 권위 소스로 + 얇은 SQLite 인덱스, 벡터 RAG 대신 결정적 검색을 사용하며, "이해"는 외부 AI에 맡기고 엔진은 검색과 거절 응답만 수행합니다. CEMA(Cognitive Event-driven Memory Architecture, 인지-이벤트 구동 메모리 아키텍처) 개념을 기반으로 구축되었습니다.
개인 프로젝트, vibe coding 독자 개발: 아키텍처와 요구사항 설계는 본인이 수행했고, 코드는 AI 보조로 구현되었습니다.
프로젝트 소개
AI记忆中枢(AI-MemoryHub)은 "장기 기억"을 두 계층으로 나눕니다:
백엔드 본문(권위 소스): 각 기억은 YAML front-matter를 가진 Markdown 파일로, 모든 의미 콘텐츠를 저장합니다. 검색에 참여하지 않으며, 필요 시 ID로 가져옵니다(즉, "잊혀진 콜드 스토리지").
프론트엔드 인덱스(얇은 SQLite 테이블):
id / title / summary / aliases / tags / linked / anchors / created / updated+features(하위 엔티티 변형 정규화) + 4요소person / event_date / location / topic을 저장하며, 모든.md의 front-matter에서 전량 재구축할 수 있습니다. 검색은 여기서만 발생하며, 고유 ID가 일치한 후에 본문을 가져옵니다.
이 설계를 CEMA(프론트엔드 얇은 인덱스 + 백엔드 본문, 프론트/백엔드 엄격 1:1, 인덱스는 본문에서 전량 재구축 가능)라고 합니다——무상태 검색, 값싼 저장으로 망각 없음이며, 기존 메모리 시스템의 운영 부담을 덜어냅니다(벡터 인프라 없음, 야간 LLM 파이프라인 없음, Agent 직접 쓰기).
제3자 의존성 제로(Python 표준 라이브러리만 사용)로 설계되었으며, 어떤 AI 대형 모델 API와도 연결할 수 있고, 이해 계층은 AI 클라이언트 / Agent / 유료 LLM 중 하나가 담당합니다.
명명 규칙: 이 문서에서 「AI记忆中枢(AI-MemoryHub)」은 이 프로젝트의 공식 이름입니다. 「HMA」는 그 하부 아키텍처인 Hybrid Memory Architecture(혼합 메모리 아키텍처)를 특별히 지칭합니다. 코드의
hma패키지 이름, MCP server 이름,HMA_LLM환경 변수 등 식별자는 변경되지 않습니다.
핵심 특성
이벤트화 기억: 이벤트가 유일한 운반체이며, 단기/장기, 상황/의미로 분류하지 않습니다.
프론트/백엔드 엄격 분리: 얇은 SQLite 인덱스 + Markdown 본문, 인덱스는 front-matter에서 전량 재구축 가능
망각 없음, 전량 보존: 중요도 점수 없음, 망각 곡선 없음, 판단은 검색 시점에 맡김
벡터 추측에 반대하는 결정적 리콜: 제로 벡터/제로 임베딩; F-stage 하위 엔티티 변형 정규화 + C+A 장 수준 명확화 + READ 본문 가져오기 + 순환 쿼리
Tag가 곧 Mod인 패키지 단위 탑재/해제: memory 아래 폴더 복사/삭제 = 인지 블록 하나 탑재/해제
모델 무관: 범용 LLM 어댑터, 오늘은 Claude, 내일은 GPT, 모레는 로컬 Ollama여도 코드를 바꿀 필요 없음
쿼리 계약 강제: MCP 경계에서 모든 검색에 QueryEnvelope 검증 수행(
keywords/mode누락 시 바로 거부)
아키텍처 철학, 검색 분류와 해결 방안은
memory/项目/AIMH-design-journal/아래의 설계 문서를 참조하세요. MCP 도구 목록, 엔진 API, 검색 메커니즘, 어댑터, 설계 불변식, 벤치마크 기준은 모두 **技术参考.md**에 모아져 있습니다. 이 문서는 "무엇인가 / 어떻게 실행하는가"만 다룹니다.
Related MCP server: mcp-ltm
프로젝트 구조
memory/는 AI记忆中枢(AI-MemoryHub)의 단일 권위 저장소입니다. 각 기억 패키지 = 하나의.md이벤트 파일(##제목 트리 + YAML front-matter) + 패키지 내index.db(얇은 인덱스 캐시,.mdfront-matter에서 전량 재구축 가능, 삭제해도 데이터 손실 없음).
AIMH/
├── hma/ # 引擎核心(零运行时依赖,仅标准库)
│ ├── hma_core.py # Memory 类:write/query/query_anchors/resolve_query/read_section/link/rebuild/orchestrate/list_all_in_scope/ingest + derive_anchors/query_features/recall_multihop
│ ├── envelope.py # QueryEnvelope 校验层(MCP 边界强制)
│ ├── cli.py # 命令行入口
│ ├── server.py # MCP server(stdio JSON-RPC,8 工具)
│ ├── engine/ # 分支接口 / CLI(dispatch + @register + handlers)
│ ├── ingest.py # AI 收录管线
│ ├── daylog.py / tree.py / llm_adapter.py
├── scripts/core/ # 独立确定性脚本(rebuild_index / relocate / migrate_*_memory / compact / deploy_mcp …)
├── skills/ # 技能(项目级副本,与用户级 ~/.workbuddy/skills 双副本)
├── memory/ # 权威记忆库(单一真相)
├── 一键更新记忆索引.exe # 手动重建索引小程序(双击即用,零 AI)
├── pyproject.toml # 零运行时依赖声明
└── README.md실행流程
설치
pip install -e . # 提供 hma-mcp / hma 两个命令pyproject.toml은 제로 런타임 의존성(표준 라이브러리만)을 선언합니다. 벡터 라이브러리나 외부 서비스가 필요 없습니다.
세 가지 사용법
1. 명령줄(수동 / 스크립트)
python -m hma.cli --root memory write \
--id proj-rag --title "放弃 RAG 主记忆" --summary "改事件驱动分层" \
--tags project,decision --aliases "分层记忆" --body "# ...\n正文"
python -m hma.cli --root memory query "分层记忆" --top-k 5
python -m hma.cli --root memory link proj-rag todo-mcp
python -m hma.cli --root memory show proj-rag
python -m hma.cli --root memory list
python -m hma.cli --root memory rebuild # 删了 index.db 也能恢复2. MCP server(모든 AI 클라이언트 연결) ⭐ 권장
python -m hma.server --root memory
# 或 entry point: hma-mcp --root memorystdio 위의 JSON-RPC 2.0, 8개 도구 노출(3단계 검색 깔때기 L1→L2→L3 + 쓰기/연관/재구축/수집):
도구 | 역할 |
| 이벤트 패키지 하나를 수동 구조화로 기록(id가 있으면 덮어씀) |
| L1 패키지 수준 결정적 검색, Top-K 후보 반환(ID 일치) |
| L2 장 수준 앵커 검색, |
| 리콜 명확화 통합 진입점: 여러 엔티티면 명확화, 아니면 Top-K 반환; 멀티홉 + 거절 게이트 지원 |
| L3 본문 가져오기: (id, heading)으로 해당 |
| 두 이벤트 패키지를 양방향 연결 |
|
|
| 능동 수집: 사용자가 텍스트를 붙여넣으면 AI가 전체 파이프라인 실행(아래 참조) |
Claude Desktop / Codex / Cline / WorkBuddy 등 어떤 MCP 클라이언트든 설정 한 줄이면 됩니다:
{
"mcpServers": {
"aimh": {
"command": "python",
"args": ["-m", "hma.server", "--root", "/path/to/.memory"]
}
}
}WorkBuddy 플러그 앤 플레이 배포: 저장소에 원클릭 배포 스크립트가 포함되어 있으며, 런처를 WorkBuddy 설정 디렉터리로 복사하고 ~/.workbuddy/mcp.json을 병합 작성합니다(aimh 커넥터만 수정, 나머지 보존, python 버전 자동 감지, 경로 하드코딩 없음), 그리고 ~/.hma_home 포인터를 등록합니다:
python scripts/core/deploy_mcp.py # 部署(幂等,可重跑)
python scripts/core/deploy_mcp.py --dry-run # 只预览将写出的配置배포 후 WorkBuddy 커넥터 관리 페이지에서 「신뢰」를 클릭하여 aimh 커넥터를 활성화하면, 새 창에 mcp__aimh__* 도구가 나타납니다.
⚠️
server.py를 수정한 후에는 커넥터에서 비활성화→활성화 / 다시 Trust해야 상주 프로세스가 새 코드를 로드합니다.
3. 라이브러리로 사용(Python import)
from hma.hma_core import Memory
m = Memory("memory")
m.write(id="x", title="X", summary="s", tags=["t"], body="# X\n正文")
for rid, title, summary, score in m.query("x"):
print(rid, score)쓰기와 수집
능동 수집(memory_ingest)——사용자가 텍스트를 붙여넣으면 AI가 전체 파이프라인을 실행합니다: 기존 패키지 요약을 읽어 연관 발견 → CEMA 응집성 + 볼륨 게이트에 따라 이벤트 패키지로 분할 → 각 패키지의 메타데이터 생성 → .md 권위 소스에 쓰기 + 인덱스 upsert → 기존/신규 패키지와 양방향 연결. LLM API가 설정되지 않으면 단일 패키지 휴리스틱으로 폴백하며, 도구는 항상 사용 가능합니다.
# 有 LLM:AI 自动拆分+关联
echo "周会:放弃 RAG,改事件驱动;下周三前完成 MCP 评审。" \
| python -m hma.cli --root memory ingest --scope wb
# 无 LLM / 不想调模型:单包兜底
echo "随手记一条想法" | python -m hma.cli --root memory ingest --no-llm제로 비용 경로(Agent가 이해 계층): key가 설정되지 않은 경우, 현재 세션 Agent가 이해 계층 역할을 하도록 하고(aimh-ingest 스킬 로드), 결정적 엔진이 저장을 수행합니다——유료 LLM 경로와 동형이며 교체 가능합니다. 텍스트 유형이 불확실하면 먼저 aimh-intake 메타 라우팅 스킬을 로드하여 분류 결정을 내린 뒤, oc-dossier / aimh-ingest / aimh-project / memory-import 해당 스킬을 체인으로 로드하여 저장하며, 자신은 어떤 memory/ 파일도 작성하지 않습니다.
유료/로컬 경로: HMA_LLM을 설정하면(해당 key/엔드포인트도 준비) 자동으로 llm_adapter 실제 LLM을 사용하며, 코드를 변경할 필요가 없습니다. LLM 호출 실패 시 자동으로 휴리스틱으로 폴백합니다.
타임라인: 일일 기록 패키지(daylog)
주 메모리 저장소는 타임라인이 아닌 주제로 구성됩니다. daylog는 직교하는 타임라인을 보완하며, 주제 원칙을 깨지 않습니다:
python -m hma.engine daylog add "一段叙事:这天发生的事" \
--linked 主题包id --tags 关键词1,关键词2 [--date 2026-07-25]
python -m hma.engine daylog show 2026-07-25 # 全天
python -m hma.engine daylog show 2026-07-25 --q 关键词 # 精准搜寻
python -m hma.engine daylog range --start d1 --end d2시간은 가중치가 아닌 필터 키입니다(위치 결정 = id에 내장된 날짜의 결정적 비교, 신선도 가중치 없음). 모호한 시간 표현("그저께/지난 수요일")은 Agent가 ISO 날짜로 파싱한 후 명령을 호출합니다.
컨텍스트 압축 아카이빙(일주기 리듬 · Agent가 이해 계층)
컨텍스트 창이 거의 가득 찼을 때, 이미 논의했지만 아직 저장되지 않았고 나중에 필요할 수 있는 오버플로 콘텐츠를 Agent가 저장 위치를 판단하고 응축 요약을 생성하여, 결정적으로 scripts/core/compact.py에 쓰기 위임합니다:
python scripts/core/compact.py \
--root memory --sink <daylog|cache|progress> \
--summary "<冷凝摘要>" --source "<溢出来源>" \
[--date YYYY-MM-DD] [--id <eid> --title "<标题>"] [--project <pid>] \
[--linked a,b] [--tags x,y] [--conflict-event <id> --conflict-intro "<一句话>"]철칙: 압축 = 가산식 콜드 요약, 권위 원문은 한 글자도 바꾸지 않습니다. 새 정보가 어떤 권위 이벤트와 진짜로 충돌할 때만 덮어쓰고 감사 가능한 trail을 추가합니다.
외부 기억 마이그레이션
scripts/core/ 아래의 migrate_wb_memory / migrate_claude_memory / migrate_gemini_memory / migrate_codex_memory는 각 AI 클라이언트의 네이티브 장기 기억을 AIMH로 마이그레이션하여, 검색 가능한 CEMA 프론트엔드 인덱스를 장착합니다:
python scripts/core/migrate_wb_memory.py --wb-dir ".workbuddy/memory" --root memory/项目/AIMH-design-journal
python scripts/core/migrate_claude_memory.py --root memory --namespace 其他
python scripts/core/migrate_gemini_memory.py --root memory --namespace 其他
python scripts/core/migrate_codex_memory.py --root memory --namespace 其他고급 검색(scope / 거절 / 다중 질문 / 열거)
쓰기 시점과 읽기 시점의 여러 단계 강화 메커니즘은 **技术参考.md §7**을 참조하세요:
scope집중: 디렉터리 경로를 전달하면 해당 하위 트리만 리콜하여, 하위 트리 간 간섭을 차단합니다(29개 패키지 → 11개 패키지). 범위만 좁히고 거절을 대신하지 않습니다.거절 계층
allow_abstain: 커버리지 부족/도메인 외 쿼리에 대해 명시적으로 거절을 반환하여, 지어내는 것을 방지합니다(V1.0 구현 완료, 기본 켜짐).다중 질문
sub_queries: AI가 한 번에 하위 질문 목록을 주면, 엔진이 결정적으로 팬아웃하여 병합하며, 개별 왕복이 없습니다.열거
enumerate: scope 하위 트리 내 모든 패키지를 나열합니다(Top-K 정렬 아님).멀티홉
multihop: 쓰기 시점에 큐레이션된linked엣지를 따라 BFS로 클러스터를 확장하여, 관계/구조 사각지대를 보완합니다(opt-in).
모든 검색류 MCP 호출은 QueryEnvelope 계약의 적용을 받습니다(q/keywords/mode 필수, 누락 시 ENVELOPE_VIOLATION으로 거부).
현재 상태
프로젝트 상태(2026-08-20): LLM 리소스(무료 모델 할당량)가 소진되어 이 프로젝트는 공식적으로 종료되었으며, 개발 단계가 끝났습니다. 코드, 문서, 벤치마크 데이터는 현재 상태를 유지합니다. 보류 중인 사항(예: LoCoMo 전체 벤치마크)은 사용 가능한 리소스가 있을 때 언제든지 재개할 수 있습니다.
정체성: 제로 의존성 참조 구현 + 개인 철학 실험장——이벤트화 기억, 프론트/백엔드 분리, 망각 없음, 벡터 추측 반대 등의 설계를 제로 의존성으로 공학 검증했으며, 리콜 검색 4요소, F+C+A+READ 3단계 앵커 파이프라인, LoCoMo / MemoryStress 벤치마크 평가를 연동했습니다.
실현된 철학: 이벤트화 기억 · 프론트/백엔드 엄격 분리 · 망각 없음 전량 보존 · 벡터 추측 반대 결정적 리콜 · Tag가 곧 Mod인 패키지 단위 탑재/해제 · 창 간 오프라인 통합(일주기 리듬).
엔지니어링 상태:
제3자 런타임 의존성 제로(Python 표준 라이브러리만)
MCP server가 8개 도구 노출(write / query / query_anchors / resolve / read_section / link / rebuild / ingest)
리콜 검색 4요소(person / event_date / location / topic)가 일등 필드가 되었으며, 읽기 시점에 소프트 가중치 적용
앵커 수준 검색이 F+C+A+READ 3단계로 업그레이드됨(프로덕션 엔진이 폐루프 완성)
거절 계층 V1.0 구현 완료(4중 게이트 +
corpus_missing_entity하드 거절,allow_abstain기본 켜짐)QueryEnvelope 계약 구현 완료(MCP 경계에서
q/keywords/mode강제, 다중 질문 팬아웃sub_queries, 열거list_all_in_scope)스킬을 플러그 앤 플레이 클라이언트로 제공 + 상주 능동 트리거 스킬(aimh-always)
벤치마크 평가(실제 데이터 폐루프 검증 완료):
LoCoMo 1540문제: hit@30 ≈ 99.6% / recall@30 ≈ 99.5% / hit@5 89.7–92%
MemoryStress 300문제:
baseline77% /B_gold89.7%
전체 기준(레드라인 포함: OMEGA 38.3%는 병기 불가, TrueMemory 93%를 정렬 목표로)은 **
技术参考.md§9**을 참조하세요.
알려진 한계:
창 내 실시간 라이브 문서 통합 재설정(대화하면서 조각을 기존 본문에 통합)은 현재 Transformer 아키텍처에서 완전판을 만들 수 없으며, 비-TF 아키텍처(영속 상태 SSM/Mamba 계열, 또는 진짜 AGI)를 기다립니다.
MCP 커넥터는 클라이언트에서 「신뢰」를 클릭하여 활성화해야 함
엔진 API 직접 호출은 MCP 경계의 QueryEnvelope 제약을 우회함(예상된 격리, 테스트 스크립트는 API를 사용하므로 영향 없음)
아키텍처 트레이드오프(능력 상한은 AI 계층에 있음): CEMA는 이해력(귀납/모드 판단/keywords 추출/sub_queries 분해/linked 큐레이션)을 AI 계층에 집중시키고, 엔진은 결정적 실행만 수행합니다. 이점은 엔진이 매우 작고 디버깅 가능하며 AI 업그레이드에 따라 공짜로 향상된다는 점입니다. 대가는 AIMH의 품질 상한 = 짝을 이루는 AI의 지능 상한이라는 것입니다——AI가 약하면 「가끔 잘못 사용되는 예쁜 파일 캐비닛」으로 퇴화합니다. 세 가지 완충 장치(엔벨로프 하드 검증/쓰기 시점 큐레이션 분할 상환/거절 게이트 최후 방어)는 「AI가 어리석을 수 있음」을 「통제 가능하고 교정 가능함」으로 바꾸지만, 그 상한을 제거하지는 않습니다. 자세한 내용은 《리콜 명확화의 수학과 언어철학적 사고》 §11.5를 참조하세요.
License
MIT
Available Tools
7 toolsmemory_ingestA
主动收录:用户提供一段原始文本,AI 执行完整管线——理解并拆分为凝聚的事件包、生成结构化元数据、写入 .md 权威源 + 索引、与现有/新建包建立关联。模型由通用适配器决定(模型无关)。未配置 LLM API 时退化为单包启发式。
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | 待收录的原始文本 | |
| model | No | 可选,覆盖默认模型名 | |
| scope | No | 作用域标签(如 user_global / workspace_x),会加进每个新包的 tags | |
| provider | No | 可选,覆盖默认 LLM 厂商:openai / anthropic | |
| auto_link | No | 是否自动建立关联,默认 true |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses behavioral aspects: it performs multiple steps (splitting, metadata generation, writing to .md and index, linking), is model-agnostic, and falls back to a heuristic when no LLM API is configured. This is comprehensive and avoids surprises.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences that front-load the purpose and cover key aspects without redundancy. Every sentence adds value, including fallback behavior and model-agnostic property.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description thoroughly covers input handling and internal behavior but omits any mention of return values or output format. Given the absence of an output schema, the agent is left without information on what the tool returns, which is a minor gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers 100% of parameters with descriptions, so the description does not need to add parameter details. It provides overall pipeline context but no additional parameter-level semantics beyond what the schema offers, meeting the baseline expectation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: accepting raw text and executing a full pipeline to split into event packets, generate metadata, write to authoritative source with indexing, and establish links. It distinguishes from sibling tools like memory_write (which likely writes a single packet) and memory_link (which creates associations) by describing a more comprehensive ingestion process.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly indicates usage for ingesting raw text into the memory system, but does not explicitly state when to use this over alternatives or provide exclusion criteria. The context from sibling tools makes it clear this is for initial ingestion versus querying or linking, but explicit guidance is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_linkA
双向关联两个事件包(更新两者 front-matter 的 linked 字段)。
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | 事件包 ID | |
| b | Yes | 事件包 ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses the bidirectional update to linked fields, but does not mention potential side effects, reversibility, or permission requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, front-loaded with action and effect, no extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (2 parameters, no output schema), the description is nearly complete. Could mention what 'bidirectionally link' means operationally, but overall sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with each parameter described as '事件包 ID'. The description does not add extra meaning beyond the schema, so baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'bidirectionally link' and the resource 'two event packages', specifying it updates the linked field in both front-matters. This distinguishes it from siblings like memory_write or memory_query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for linking event packages but provides no explicit guidance on when to use this tool versus alternatives like memory_write or memory_query. It lacks when-not-to-use or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_queryA
确定性无状态检索:在 id/title/alias/tag/summary 上做关键词匹配,返回按确定性规则排序的 Top-K 候选(命中唯一 ID)。不依赖热度/权重。
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | 检索关键词 | |
| top_k | No | 返回条数,默认 5 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, description discloses statelessness, determinism, matching fields, sorting rules, and non-reliance on weights. It does not mention side effects or rate limits, but provides adequate behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is a single concise sentence with no redundant information, front-loading the core action and key characteristics.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple query tool with 2 parameters and no output schema, the description covers purpose, matching fields, sorting, and behavior. It could mention the return format explicitly but is otherwise complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with descriptions for both parameters. The description adds value by specifying the fields searched and sorting criteria beyond the schema's parameter descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it is a deterministic stateless retrieval tool for keyword matching on id/title/alias/tag/summary, and distinguishes itself from siblings by noting it does not rely on popularity/weights.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Description implies use for deterministic keyword matching without popularity bias, but does not explicitly state when to use this tool versus siblings like memory_query_anchors or memory_read_section.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_query_anchorsA
锚点层细粒度召回:在事件包的 anchors 子事件锚点上做关键词匹配,返回命中的子事件(包ID + 锚点标题 + 摘要 + 定位 + 分数)。用于故事包/长正文按剧情节点召回——当 memory_query 命中率低时,anchors 往往能把内容词召回(如「幽影核心」「圣保罗之焰」「纽约之战」)。
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | 检索关键词(剧情/事件/特征词) | |
| top_k | No | 返回条数,默认 5 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It explains the matching behavior and return fields, but does not disclose side effects, authorization needs, or limitations such as whether it is read-only or if it modifies data.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences, with no fluff. The key information (what, how, when) is front-loaded and efficiently communicated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with two parameters and no output schema, the description is fairly complete. It explains what the tool does, what it returns, and its typical use case. No major gaps are present.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, but the description adds context: the tool matches on anchor sub-events within story packages, clarifying the domain of the 'q' parameter. This goes beyond the schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: fine-grained recall on anchor sub-events via keyword matching, returning specific fields (package ID, anchor title, summary, location, score). It also distinguishes itself from siblings by mentioning its use for story packages/long texts and when memory_query has low hit rate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says to use this tool when memory_query has low hit rate, providing a clear usage scenario. It implies alternatives (memory_query) but does not explicitly state when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_read_sectionA
按小标题精准读取事件包正文的某一段(而非整包),节省上下文窗口。配合 memory_query_anchors 使用:先 query_anchors 拿到命中的 locator,再用本工具按 locator 取该段正文。heading 为正文里 ## / ### 小标题的片段(包含匹配),可直接用 locator 值。
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | 事件包 ID | |
| heading | Yes | 小标题片段(##/### 标题的包含匹配,可用 query_anchors 返回的 locator) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It explains reading by heading and use of locator. Implies read-only operation, but not explicitly stated. No contradictions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences in Chinese, front-loaded with purpose, then usage. No extraneous information. Efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Simple tool with 2 required params and no output schema. Description covers usage pattern and parameter meaning, mentions context saving. Not 5 because missing behavior on missing heading, but adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 100% coverage, so baseline 3. Description adds meaning: heading is a subtitle fragment and can be locator from query_anchors. Adds value beyond schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states it reads a specific section of an event package body by subtitle, saving context window. Distinguishes from siblings like memory_query_anchors (which finds locators) and memory_query (likely retrieves full package). Verb '读取' and resource are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly instructs to use with memory_query_anchors: first query_anchors to get locator, then this tool with locator. Provides clear when-to-use and usage pattern.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_rebuildA
从所有 .md 的 front-matter 全量重建 index.db。索引损坏时调用——.md 是权威源,重建不丢数据。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It states that .md is authoritative and rebuild doesn't lose data, which reassures about safety. However, it doesn't detail whether existing index data is overwritten or merged, or if any permissions are needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences in Chinese, extremely concise. It front-loads the action and condition, with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no parameters and no output schema, the description covers purpose and usage condition adequately. It could mention the effect on other tools (e.g., index becomes current) but that's not critical.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so schema coverage is 100% by default. The description adds no parameter details, but that's acceptable as no parameters exist. Baseline of 4 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: rebuilding index.db from all .md front-matter. It specifies the authoritative source (.md) and that data is not lost, distinguishing it from siblings like memory_write or memory_query.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'call when index is corrupted', providing a clear usage condition. It implies not to use it for normal operations, though it doesn't list alternative tools or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
memory_writeA
写/改一个事件包:原子写 .md(权威源)+ 确定性 upsert 索引。id 存在则覆盖更新。tags/aliases/linked 为字符串数组。
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | 事件包唯一 ID(文件名) | |
| body | No | Markdown 正文 | |
| tags | No | 标签;trivial 表示琐碎内容(检索降权) | |
| title | No | 标题 | |
| linked | No | 关联的其他事件包 ID | |
| aliases | No | 别名/同义词,用于检索命中 | |
| created | No | 创建日期 YYYY-MM-DD(可选) | |
| summary | No | 一句话摘要 | |
| updated | No | 更新日期 YYYY-MM-DD(可选) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses atomic write, upsert, and overwrite behavior, but lacks details on auth, rate limits, failure modes, or concurrency. Basic behavioral info is present but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no wasted words. The description is front-loaded with the core action and efficiently covers key behavior.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description does not explain return values. It also omits usage of optional body, trivial tag implications, and idempotency. Adequate but incomplete for a tool with 9 parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All parameters have schema descriptions (100% coverage). The tool description does not add significant meaning beyond the schema; it merely confirms that tags/aliases/linked are string arrays. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool writes/modifies an event package with atomic write and upsert. It uses specific verbs and resource, and distinguishes from sibling tools like memory_query (query) and memory_read_section (read).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this is the primary write tool but does not explicitly state when to use it vs alternatives like memory_ingest. No when-not-to-use guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v0.1.0- First observed
memory_ingest - First observed
memory_link - First observed
memory_query - First observed
memory_query_anchors - First observed
memory_read_section - First observed
memory_rebuild - First observed
memory_write
TDQS
All seven tools have clearly distinct purposes: writing/updating events, querying, linking, anchor-level search, section reading, index rebuilding, and intelligent ingestion. No overlap in functionality.
All tools follow a consistent 'memory_' prefix with a verb_noun pattern (e.g., memory_write, memory_query, memory_link). The naming is predictable and systematic.
With 7 tools, the server is well-scoped. Each tool addresses a specific need for managing memory events without unnecessary bloat or deficiency.
The set covers writing, querying, linking, section reading, and maintenance. However, it lacks an explicit deletion tool and a way to retrieve full event packages, which are notable gaps for a complete lifecycle.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
- memnodeOAuthdev.memnode
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Token-efficient MCP memory for Markdown vaults. Tiered search, GraphRAG, AI memories.
Related MCP Servers
- AlicenseAqualityBmaintenanceA local-first shared memory layer for MCP-aware agents like Claude, Codex, and Hermes, enabling persistent memory across chats and clients via Markdown files and SQLite FTS.62MIT
- AlicenseNot gradedqualityDmaintenanceProvides persistent long-term memory for AI assistants with tag-based retrieval, wiki-style linking, and source references, storing memories as markdown files with SQLite index.1MIT
- AlicenseBqualityAmaintenancePersonal multi-LLM memory repository using Markdown as source of truth, SQLite FTS5 for retrieval, and MCP tools for search, context, and write proposals.74Apache 2.0
- AlicenseAqualityBmaintenanceMCP server for persistent, cross-session, local-first memory for AI agents, storing memories as Markdown files with SQLite indexing for hybrid search.24Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Traceless-zero/AI-MemoryHub'
If you have feedback or need assistance with the MCP directory API, please join our Discord server