Skip to main content
Glama
yanglinfeng

Memory Bridge

by yanglinfeng

Memory Bridge(忆桥)

Local-first, evidence-backed knowledge & memory layer for MCP.

内网 AI 知识库引擎 —— 企业文档问答 / 制度与合同检索 / 私有化部署,每个答案带逐句出处与可回放 traceId;同时是不绑定任何客户端的 MCP 长记忆中间件。

简体中文 · English

License: Apache-2.0 Node Schema MCP ghcr.io MCP Registry

30 秒跑起来(无需本机 Node,无需构建):

docker run -i --rm -v memory-bridge-data:/data ghcr.io/yanglinfeng/memory-bridge:latest

已发布到官方 MCP Registry(io.github.yanglinfeng/mcp-memory-bridge),多架构镜像见 GHCR。

EN — Memory Bridge answers three questions most RAG / memory stacks skip: where did this sentence come from, is the source still valid, and who can see it. Every answer carries source bindings and a retrieval traceId; every change is audited; every namespace is isolated. By default, model requests go to local Ollama. If you configure a remote model endpoint, the relevant prompts and context are sent there.

AI 知识库最大的风险不是答不出,是编造和引用已废止的文件。忆桥给回答配出处、给变更留审计、给部门数据上隔离。默认配置使用本机 Ollama;如果将模型地址配置为远程服务,相关提示词和上下文会发送到该服务。

什么时候该用忆桥

你在搭企业内部知识库,并且满足下面任意一条:

你的场景

忆桥对应的能力

员工问的是制度、流程、合同、售后记录这类有版本、有归属的文档

文档级版本链,内容变更自动轮替,旧版本退出默认检索但仍可审计

你被要求回答「这条结论出自哪份文件哪一段」

逐句来源绑定 + 可回放的 traceId

不同部门不能看到彼此的资料

用户 / 命名空间 / 作用域三层隔离 + 可信会话签发

数据不能出内网

本地优先,默认本机 Ollama,无外部依赖

也就是说:企业知识库 / 内网文档问答 / 制度与合同检索 / 私有化部署,以及在这些场景下的长记忆层——忆桥同时是不绑定任何客户端的 MCP 记忆中间件,可直接接进 Claude Desktop、Cline、Cursor 等客户端。

反过来,如果你只是想让 AI 记住你的代码风格偏好,或者想要一个托管在云上的记忆服务,忆桥不是最优选择——它的强项是可审计,代价是要你自己部署。

Related MCP server: mindpalace

为什么是忆桥

企业落地绕不开的问题

忆桥的机制

这句话的出处是哪份文件的哪一段?

非破坏式巩固逐句绑定来源,每次召回带 traceId,可回放「查询改写 → 候选 → 融合 → 重排 → 选择 → 注入」全程

文件改版了,旧答案还会被引用吗?

文档级版本链:内容变更自动走 supersede,旧版本退出默认检索,历史版本仍可审计回溯

谁能看见、谁改过?

用户 / 命名空间 / 作用域三层隔离 + 可信会话签发与授权矩阵 + 全操作审计日志

已实现

检索与问答

  • FTS5 + Dense ANN + 概念倒排 + 严格重排的全库混合检索,不按「最近 N 条」预截断

  • Cross-encoder 重排:bge-reranker-v2-m3 Python sidecar,按语料域(policy / open)分档相关性门槛

  • 相关性不足时按粗排分填充(filler),保留多跳证据链

  • 弃答策略:语料里没有就明确说没有,不硬编

  • 答案工具:calculator / date_diff / date_shift——算术与日期交给代码算,不让模型口算

  • bi-temporal 召回:检索窗口同时受 valid_from / valid_to 约束

接入面

  • 10 个 MCP 工具:记忆读写 7 个 —— memory_remember · memory_recall · memory_get_context · memory_update · memory_forget · memory_list · memory_stats;确定性求解 3 个 —— answer_calculator · answer_date_diff · answer_date_shift

  • HTTP API + OpenAI 兼容接口 + React 管理台(候选审核、版本证据、召回解释、索引水位、系统健康)

  • 知识库 / RAG 应用层直写通道,字段级契约见 API 接口文档

记忆治理

  • 自然语言记住 / 纠正 / 遗忘的同步快车道;纠正保持稳定 UUID 并追加版本,遗忘先写 tombstone

  • 跨多轮推断固定进入待确认,支持确认 / 拒绝 / 阻止未来等价 claim——没有 inference 自动提交开关

  • 非破坏式巩固:来源变化或遗忘后摘要自动失效并可重建

  • 默认保留用户数据:无自动衰减、无证据脱敏

工程底座

  • SQLite(node:sqlite)+ outbox / jobs:租约、重试、dead letter、崩溃重放、幂等执行

  • 全操作审计 + 检索 JSONL 日志(元数据 / 诊断分级、脱敏、轮转、保留清理)

  • Memory Doctor 只读体检:重复、冲突、孤儿、失效摘要、超大记忆、零结果热点

  • 模型全可配置:默认生成 qwen2.5:14b、embedding bge-m3:latest(Ollama),无需云服务

Quick Start

前置:Node.js ≥ 24,Ollama 已运行(Docker 方式不需要本机 Node)。

ollama pull qwen2.5:14b
ollama pull bge-m3:latest

方式 A —— 官方镜像(推荐,零构建)

docker run -i --rm -v memory-bridge-data:/data ghcr.io/yanglinfeng/memory-bridge:latest

镜像同时提供 linux/amd64 与 linux/arm64(Apple Silicon 原生运行,不走模拟)。

方式 B —— npx(只接 MCP 客户端)

注:npm 包 mcp-memory-bridge 尚在发布准备中。若此命令报 404,请改用方式 A 或 C。

MEMORY_BRIDGE_USER_ID=default npx -y mcp-memory-bridge

方式 C —— 从源码运行(管理台 / 开发)

git clone https://github.com/yanglinfeng/memory-bridge.git
cd memory-bridge
npm install
npm run build
npm start          # HTTP 服务 + 管理台:http://127.0.0.1:3789

首次启动为空记忆库——没有演示数据,管理台只展示真实写入的内容。

容器里跑 HTTP 模式要注意:忆桥只监听回环地址(127.0.0.1 / ::1),这是有意的安全 契约——服务信任 loopback 上的无令牌请求。所以容器里不能用 -p 3789:3789 做端口映射 (映射到的是容器自己的回环,宿主机连不上),请改用 --network host(Docker Desktop 需先 在设置里启用 host networking)。完整说明见 Dockerfile 头部注释。

接入任意 MCP 客户端(Claude Desktop / Cline / …),用官方镜像最省事:

{
  "mcpServers": {
    "memory-bridge": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "memory-bridge-data:/data",
        "ghcr.io/yanglinfeng/memory-bridge:latest"
      ]
    }
  }
}

从源码运行时改用绝对路径:

{
  "mcpServers": {
    "memory-bridge": {
      "command": "node",
      "args": ["/absolute/path/to/memory-bridge/dist/server/mcp-stdio.js"],
      "env": {
        "MEMORY_BRIDGE_USER_ID": "default"
      }
    }
  }
}

MEMORY_BRIDGE_USER_ID(或改用 MEMORY_BRIDGE_MCP_TOKEN)是必填项——两者都缺时服务会拒绝 启动。镜像里已内置 MEMORY_BRIDGE_USER_ID=default,所以 Docker 方式无需再配。 npm 包发布后,也可改用 "command": "npx" 与 "args": ["-y", "mcp-memory-bridge"]。

接入示例

三个零构建、可直接运行的最小示例(curl / Node / Java),覆盖写入(含 corpusDomain / classification)、幂等重放、召回、supersede 改版与时序对照查询:

export MB_TOKEN=你的令牌        # 见 examples/README.md §1

bash examples/curl/quickstart.sh
node examples/node/quickstart.mjs
java examples/java/QuickStart.java      # JDK 17+,零依赖

详见 examples/README.md。

文档一致性

文档里声明的 schema 版本、环境变量、npm 脚本、HTTP 路由与配置默认值,可以和代码事实一键对撞:

npm run check:docs

它会把「文档说的」与「代码里的」逐项比对并在不一致时以非零退出码失败,适合在发布前与每次 大改后重跑。见 CONTRIBUTING.md。

完整安装、运维、接口与排障文档从 docs/README.md 进入; 基准评测的条件与一键复现见 BENCHMARKS.md。

评测

忆桥自带评测与压测链路(scripts/ 下 40+ 个可执行脚本,覆盖检索、重排、巩固、命名空间隔离、上下文反思、规模、可靠性与崩溃恢复),并在 docs/acceptance-report-*.md 中保留带日期与环境的证据快照。

公开基准(英文知识库问答、中文自建集)的条件与一键复现脚本已列在 BENCHMARKS.md。 其中包含数据准备与运行限制;大规模延迟压测仍是项目内部评测,不作为公开基准。在数字可复现之前,README 不主张任何分数——这是本项目「可信层」定位的一部分。

和主流方案的区别(按维度,不按体量)

维度

忆桥

mem0

Zep / Graphiti

RAGFlow

AnythingLLM

引用可验证(来源绑定 + traceId)

✅

—

—

✅

部分

时序有效性(版本替代退出检索)

✅ 文档级

—

✅ 事实级

—

—

全操作审计日志

✅

企业版

✅

—

—

命名空间 / 部门隔离

✅ 可信会话 + 授权矩阵

企业版

✅

团队级

Workspace

遗忘与纠正(tombstone / 版本追加)

✅

✅

✅

—

—

可配置为全离线(模型端点也在本机)

✅

部分

—

✅

✅

MCP 原生

✅ 7 工具

✅

社区封装

✅

—

本表只列架构上有无,不评分数高低。各项目迭代都很快,请以各自仓库为准。

Roadmap

  • BENCHMARKS.md:公开基准的完整条件与一键复现(npm run bench:cn / bench:cmrc / bench:hotpotqa)

  • 社区四件套:CONTRIBUTING.md / SECURITY.md / CHANGELOG.md / CODE_OF_CONDUCT.md,附 .env.example 与 examples/(curl / Node / Java)

  • 文档 ↔ 代码一致性门禁 npm run check:docs(发布前与每次大改后重跑)

  • supersede 时补写 valid_to,并补 as-of 查询的回归测试

  • 清掉 3 例预存在的失败用例:迁移备份与写锁顺序那 1 例已修(改为取锁后复检文件家族); test:lifecycle 的 2 例 doctor 经查是 Node 版本低于 engines >= 24 所致,非代码缺陷

  • 英文入口 README.en.md(核心指南英文版仍待补)

  • pretest 加 Node 版本守卫:engines 在 npm 里只是警告、不阻断执行, Node < 24 跑 npm test 会稳定看到 2 例假红灯

  • 文档解析深度:推荐接入 RAGFlow / Docling 等上游,忆桥专注其上的可信层

关于开源边界的说明。 忆桥的定位是「可信层」,而可信必须可被验证——所以证据绑定、版本链、 审计日志、命名空间隔离这些构成可信层的能力,全部在本仓库、全部 Apache-2.0、且不会改为闭源。 只有两类东西不在本仓库内:企业内网的文档摄取与权限落地(解析、章节切分、ACL 裁剪、审核流、 图像链路),以及交付与运维工程(离线交付包、升级回滚、合规审计导出、带 SLA 的支持)。 它们作为独立模块提供商业支持,不影响本仓库的完整可用性——独立部署本仓库就是完整可用的内核。

联系与支持

事项

走哪个通道

缺陷报告

Issues · 缺陷报告模板

功能建议

Issues · 功能建议模板

私有化部署实施 / 商业支持与 SLA / 定制开发

Issues · 商业合作模板 或 Discussions 的 Commercial 分类

用法讨论、部署求助、调优经验

Discussions

安全漏洞

Security Advisories —— 请勿为安全问题开公开 Issue,处理流程见 SECURITY.md

维护者是个人开发者(@yanglinfeng),不开空头 SLA;缺陷会按「是否影响 出处可验证 / 版本可追溯 / 权限可隔离」排序,商务类咨询优先回复。

本项目以 Apache-2.0 授权。公司内部自用、二次开发、集成进内部系统,乃至打包进你们对外销售的产品,都不需要向我们申请授权——这是 Apache-2.0 已经给到你的权利,我们不会事后收回。

既然如此,什么情况下才需要联系?答案是需要责任,而不是许可:

你需要的是

怎么走

私有化部署实施、模型选型与调优、历史数据迁移

商业合作表单

带明确响应时间的 SLA、年度维护与升级保障

商业合作表单

企业内网场景的文档摄取、章节切分与权限落地

商业合作表单

只是想用起来

不必联系,git clone 即可

「忆桥 / Memory Bridge」名称与标识不在 Apache-2.0 的授权范围内(见许可证第 6 条)。二次分发请使用你自己的产品名,不要让人误以为出自本项目官方。

License

Apache-2.0

Available Tools

10 tools
answer_calculator算术计算器A
Read-onlyIdempotent

对算术表达式做确定性求值,支持 + - * / % ^ 与括号。召回结果中的数值需要加减乘除(金额合计、单价×数量等)时调用,不要心算。

ParametersJSON Schema
NameRequiredDescriptionDefault
expressionYes算术表达式,如 "(1234.5 + 678.9) * 2"
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed world), so the bar is lower; the description still adds that evaluation is 确定性, which reinforces the idempotent contract in task terms. It stops short of stating error behavior or the length limit, so it is good but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, capability stated first, invocation condition second, zero filler. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple, fully annotated, closed-world utility the description is sufficient to invoke correctly. The only shortfall is that with no output schema, the return shape (number vs formatted string) is never indicated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the expression parameter already carries a worked example, so baseline is 3. The operator list in the description is complementary syntax information, but the ambiguity that matters most — whether ^ is exponentiation and % is modulo vs percent — is left unresolved in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (确定性求值) and resource (算术表达式), then enumerates the operator set (+ - * / % ^ 与括号), which cleanly distinguishes it from the date-oriented siblings answer_date_diff/answer_date_shift. An agent needs no schema inspection to know exactly what this does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger condition (when recalled values need 加减乘除, with concrete examples 金额合计、单价×数量) plus a negative instruction (不要心算) that steers the agent away from an inferior alternative behavior. This is exactly the when-to-use guidance the dimension asks for.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

answer_date_diff日期差计算A
Read-onlyIdempotent

计算两个日期相差的天数与年/月/日拆分。日期支持 ISO、YYYY/MM/DD、中文(2024年3月5日)。涉及"间隔多少天/多久"的问题时调用。

ParametersJSON Schema
NameRequiredDescriptionDefault
toYes结束日期
fromYes起始日期
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered by structured data. The description adds the range of accepted date syntaxes, which is useful but is really input-format information. No handling of ambiguous or malformed dates is disclosed; with annotations carrying the behavioral burden, a 3 is appropriate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight clauses: what is computed, what input formats are tolerated, and when to trigger it. Nothing is padded and the core purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by stating the return shape (day count plus Y/M/D decomposition). For a two-parameter read-only utility with full annotation coverage, this is essentially complete; only edge cases such as reversed or unparseable dates are unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and both required parameters carry their own descriptions (起始日期 / 结束日期), so the baseline is 3. The description goes beyond that by enumerating the accepted date formats (ISO, YYYY/MM/DD, Chinese 2024年3月5日), which materially helps an agent format the inputs correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — computing the difference between two dates — and even specifies the output shape (total days plus a year/month/day breakdown), which distinguishes it from the sibling answer_date_shift (which moves a single date) and answer_calculator. An agent can route to it without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger condition: call it when the question involves '间隔多少天/多久'. That is clear when-to-use guidance, but it never names answer_date_shift as the alternative or excludes the cases that belong to it, so the routing guidance is one-sided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

answer_date_shift日期平移A
Read-onlyIdempotent

把日期平移指定天数(可为负),返回结果日期与星期。"X 天后是几号""提前 N 天"类问题调用。

ParametersJSON Schema
NameRequiredDescriptionDefault
dateYes基准日期
daysYes平移天数,可为负数
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile needs no restating. The description adds genuinely new behavioral information: negative day offsets are allowed and the result includes both the date and the weekday. It does not mention accepted input date formats or boundary behavior, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences: the operation and its return value come first, then the usage trigger. No filler, no repetition of the title, and nothing that could be trimmed without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-required-parameter, closed-world, idempotent read tool with full schema coverage, the description covers operation, accepted sign of the offset, and the return shape (no output schema exists, so stating the return value matters). The only material gap is the expected date input format, which an agent must guess at given the loose 4–40 character constraint.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% — the schema itself documents 基准日期 and 平移天数,可为负数, and even the injected _memoryRequestKey. The description's note that days may be negative merely repeats the schema, adding no new semantics, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (把日期平移指定天数) and even names the return value (结果日期与星期), so an agent immediately knows this is date arithmetic, not date parsing or lookup. It stops short of explicitly distinguishing itself from the sibling answer_date_diff, relying on the reader to infer 'shift' vs 'difference'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The second sentence gives concrete triggering question shapes ("X 天后是几号", "提前 N 天"), which is real usage guidance rather than vague intent. It does not, however, name answer_date_diff or answer_calculator as the alternative for non-shift date questions, so the boundary between siblings is left implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_forget遗忘长期记忆A
DestructiveIdempotent

根据用户明确要求删除一条记忆。采用可恢复的软删除,并保留审计记录。

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
reasonNo用户请求删除
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds meaningful nuance: the delete is a recoverable soft delete and audit records are retained. This changes how an agent should interpret the destructive hint. It does not cover auth, error, or rate-limit behavior, so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences: purpose front-loaded, behavioral nuance second. No filler or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers purpose and the key soft-delete/audit behavior, but with no output schema and only 33% parameter coverage, it leaves parameter usage and return behavior unexplained. Adequate for a simple mutation tool but incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33% (only _memoryRequestKey is documented). The description implies the id via '一条记忆' but gives no format, syntax, or explanation for the id or reason parameters, so it fails to compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (删除/delete) and resource (一条记忆/one memory) with a clear single-item scope tied to an explicit user request. It is inherently distinguishable from memory_remember/memory_update/memory_recall, but no sibling is named, so it does not meet the 5 bar of explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Establishes a clear invocation condition: use only when the user explicitly requests deletion ('根据用户明确要求'). No when-not guidance or named alternatives are provided, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_get_context生成对话记忆上下文B
Read-onlyIdempotent

在回答用户前检索相关长期记忆,并返回可直接加入模型上下文的紧凑文本。适合每轮对话前调用。

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo
kindsNo
limitNo
queryYes
minScoreNo
namespaceNo
recentTurnsNo仅用于本次查询语义消歧的最近对话;不可信且不能携带身份或 scope
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用
contextTokenBudgetNo

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is covered. The description adds the useful behavioral fact that the return value is context-ready compact text meant for injection, but says nothing about budget handling or truncation despite a contextTokenBudget parameter.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the core action and followed by the invocation timing; zero wasted words. It is arguably too terse for a 9-parameter tool, but as written it is efficient and well-ordered.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 9 parameters at 22% schema coverage and no output schema, the description should explain the retrieval knobs and the shape of the returned text. It instead covers only the high-level purpose, leaving most of the calling surface undocumented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 22% across 9 parameters, so the description is expected to compensate — and it does not. Only the oblique phrase about 'compact text for model context' hints at contextTokenBudget; nothing explains query, tags, kinds, minScore, namespace, recentTurns, or the injection key.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb+resource ('检索相关长期记忆' / retrieve relevant long-term memory) and even characterizes the output ('返回可直接加入模型上下文的紧凑文本'). That output framing helps separate it from memory_recall/memory_list, though no sibling is named explicitly, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states a clear trigger — call before answering the user, suited to every conversational turn — which is genuine usage guidance. However, it names no alternatives (memory_recall, memory_list) and gives no when-not/exclusion conditions, so the agent must infer the boundary against siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_list列出长期记忆B
Read-onlyIdempotent

按条件查看记忆,适合管理、核对或让用户确认系统记住了什么。

ParametersJSON Schema
NameRequiredDescriptionDefault
tagNo
kindNo
limitNo
queryNo
offsetNo
statusNo
namespaceNo
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is fully covered by structured data. The description adds only usage framing and no behavioral detail beyond it – nothing about pagination behavior, default result size, or what a filtered empty result means. With annotations carrying the safety burden, a 3 is appropriate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single compact sentence with the filtering scope front-loaded and no filler. It is efficient, though it is arguably too terse given the parameter surface it needs to support.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 8 parameters, no output schema, and 13% schema coverage, the description should explain the filtering and pagination model. Instead it offers only a high-level purpose, so an agent lacks enough to invoke it correctly against ambiguous siblings like memory_recall.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 13% (essentially just the internal _memoryRequestKey), so the description must compensate and does not. The vague phrase '按条件' gestures at filtering but never explains tag, kind, query, status, namespace, or the limit/offset pagination semantics, leaving 6+ meaningful parameters undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a clear verb+resource: '按条件查看记忆' (view memories by condition), which reads as a filtered list operation. However, it does not differentiate from siblings like memory_recall or memory_get_context, which also retrieve memories, so an agent cannot tell which retrieval tool to pick from the description alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides some usage context ('适合管理、核对或让用户确认系统记住了什么' – managing, verifying, or user confirmation), which implies when it is useful. But it never names alternatives (memory_recall, memory_get_context, memory_stats) or states when NOT to use it, so routing among the memory retrieval siblings is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_recall召回相关记忆A
Read-onlyIdempotent

回答涉及用户偏好、过去事件、项目状态或既有决定的问题前调用。只返回与当前查询相关的少量长期记忆,并解释命中原因。

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo
kindsNo
limitNo
queryYes
minScoreNo
namespaceNo
timestampNo
recentTurnsNo仅用于本次查询语义消歧的最近对话;不可信且不能携带身份或 scope
includeArchivedNo
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already confirm readOnlyHint, idempotentHint, and non-destructive behavior, so the safety profile is covered. The description adds useful beyond-annotation context: it returns only a small set of relevant memories and explains why each hit was returned.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no wasted text, and the usage trigger is front-loaded before the return behavior. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter retrieval tool with low schema description coverage and no output schema, the description covers purpose and usage but leaves optional filters unexplained. An agent cannot determine how to use the filtering parameters from the description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 20%, and the description does not explain any parameter beyond implying the required query. It provides no meaning for tags, kinds, limit, minScore, namespace, timestamp, includeArchived, recentTurns, or the internal request key.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description says it returns a small amount of long-term memory relevant to the current query, which is a specific retrieval purpose. It does not explicitly differentiate itself from sibling tools such as memory_get_context or memory_list, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly states when to call: before answering questions about user preferences, past events, project status, or existing decisions. It provides no exclusions or named alternatives, so it is clear context without full when-not guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_remember保存长期记忆A
Idempotent

保存值得跨会话保留的稳定事实、偏好、项目决定、重要事件或指令。不要保存闲聊、临时状态、密码、令牌或未经用户同意的敏感信息。重复内容会自动合并。

ParametersJSON Schema
NameRequiredDescriptionDefault
kindYes记忆类型
tagsNo
scopeNo写入当前连接已绑定的 personal、role、project 或 session 作用域
titleNo简短标题
sourceNo
contentYes完整、独立、脱离上下文也能理解的记忆内容
summaryNo可选摘要
validToNo
namespaceNo兼容字段;只能等于当前 MCP 连接绑定的 namespace
sourceRefNo
validFromNo
confidenceNo
importanceNo
occurredAtNo
supersedesIdNo如果新记忆替代旧记忆,填写旧记忆 ID
idempotencyKeyNo调用方生成的幂等键,防止重复写入
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare the operation is a write, idempotent, and non-destructive, so the safety profile is covered. The description adds genuinely new behavior: duplicate content is automatically merged, and sensitive information requires user consent — neither of which is expressed in the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences: what to save, what not to save, and the merge behavior. No filler, and the positive guidance is front-loaded before the exclusions.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 17-parameter mutation tool the description delivers a solid intent and safety story, and annotations plus a documented schema handle the rest. However, most non-required parameters receive no narrative explanation, so an agent gets little help on scoping or temporal fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 17 parameters and only ~53% schema coverage, the description carries some burden but offers no explicit parameter guidance. It does helpfully map its list of content types onto the kind enum values (preference, project, event, instruction), but says nothing about scope, namespace, supersedesId, idempotencyKey, or the time fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (save a long-term memory) and enumerates the content types that qualify (stable facts, preferences, project decisions, events, instructions). It clearly reads as the write side of the memory_* family, but it never names siblings like memory_update or memory_recall to disambiguate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit negative guidance — do not save chit-chat, temporary state, passwords, tokens, or sensitive info without consent — which is strong when-to-use context. It lacks an explicit alternative path (e.g. when to use memory_update instead of writing a new memory), keeping it from a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_stats查看记忆库状态A
Read-onlyIdempotent

查看长期记忆数量、类型和命名空间分布。

ParametersJSON Schema
NameRequiredDescriptionDefault
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully covered structurally. The description adds value by naming the returned dimensions (count, types, namespace distribution), which is useful given no output schema, but says nothing about refresh cost, scoping, or freshness of the statistics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single short sentence with no waste, front-loading the action and stating exactly what is reported. Nothing could be removed without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only, zero-required-parameter stats tool whose annotations already cover the safety profile, the definition is essentially complete: it names the metrics returned and the internal parameter is documented in the schema. The absence of an output schema is partly compensated by the enumeration of returned dimensions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for the single parameter (_memoryRequestKey), which is an internal proxy-injected key already documented in the schema. The description adds no parameter-level detail, so the baseline of 3 applies when the schema carries the full load.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (查看/view) and resource (长期记忆/long-term memory) and even enumerates what is surfaced: count, types, and namespace distribution. This clearly separates it from retrieval siblings like memory_list or memory_recall, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose implies the usage context (inspecting aggregate state of the memory store rather than reading or mutating entries), so an agent can infer when to reach for it, but there is no explicit when-to-use guidance, no exclusions, and no mention of any sibling as an alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memory_update修正长期记忆A
Idempotent

修改已经存在但不准确、过期或需要补充的记忆。仅提交需要更改的字段;修改 content 时必须写成修正后的完整、独立事实,不要写“用户修正了”之类的过程描述。

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
kindNo
tagsNo
titleNo
sourceNo
statusNo
contentNo
summaryNo
validToNo
namespaceNo
sourceRefNo
validFromNo
confidenceNo
importanceNo
occurredAtNo
_memoryRequestKeyNo兼容代理注入的内部请求键,用于合并同一次模型工具调用

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare mutation (readOnlyHint=false), idempotency, and non-destructiveness, so the bar is lower. The description adds genuinely useful behavior beyond that: partial-update semantics (omit unchanged fields) and a content norm (write the corrected standalone fact, not a process note like 'user corrected'). It does not cover auth or side effects on related memories.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences that are front-loaded with the purpose, then the operational rule. Every clause earns its place with no filler, though the second sentence packs several distinct constraints that could be slightly clearer if split.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter mutation tool with no output schema and near-zero schema documentation, the description covers the key behavioral contract (partial update, content correction) but leaves too many parameters unexplained. Adequate but with clear gaps given the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 6% across 16 parameters, so the description must carry the burden. It meaningfully clarifies the `content` parameter and the general partial-update contract, but leaves id, kind, tags, status, validFrom/validTo, confidence, importance, namespace and source undocumented in both description and schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (修改…记忆) and narrows scope to already-existing memories that are inaccurate, outdated, or incomplete, which implicitly separates it from memory_remember (create) and memory_forget (delete). It does not name any sibling explicitly, so differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear when-to-use context: correcting existing, inaccurate, stale, or incomplete memories, plus the partial-update rule (only submit fields that change). It lacks explicit exclusions or named alternatives (e.g., when to prefer memory_remember), so it stops short of full routing guidance.

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.

  1. 10 tool updatesv1.0.0
    • First observedanswer_calculator
    • First observedanswer_date_diff
    • First observedanswer_date_shift
    • First observedmemory_forget
    • First observedmemory_get_context
    • First observedmemory_list
    • First observedmemory_recall
    • First observedmemory_remember
    • First observedmemory_stats
    • First observedmemory_update

TDQS

A3.7/5.0

Scored across 10 tools

Disambiguation4/5

Most tools are clearly distinct: memory_remember/forget/update cover the write lifecycle, while answer_calculator/date_diff/date_shift are unambiguous utility functions. The one real overlap is memory_recall vs memory_get_context, which both retrieve relevant long-term memories and differ mainly in output format, so an agent could occasionally pick the wrong one.

Naming Consistency4/5

Two clear prefix groups (memory_* for 7 tools, answer_* for 3) give a predictable pattern, and snake_case is used throughout. Minor deviations exist: some names are verb-led (memory_forget, memory_update) while others are noun-led (memory_stats, answer_calculator), and memory_get_context is a longer compound, but all remain readable.

Tool Count5/5

Ten tools is well-scoped: seven cover the memory lifecycle and three provide computation helpers that support answering questions from recalled data. Each tool earns its place with no redundant entries.

Completeness4/5

The memory surface covers full CRUD plus listing and stats (remember, recall/get_context, update, forget, list, stats), which is a complete lifecycle. Minor gaps exist around namespace/bulk management and export, and the added calculator/date tools are helpful but arguably outside the core memory domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables multiple MCP-compatible AI clients to share persistent, versioned project knowledge across sessions with conflict-safe updates, provenance, hybrid retrieval, stale-memory handling, and context-budgeted recall.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP clients to ingest documents and notes, retain facts with their validity periods, and answer questions as of any point in time using bitemporal queries.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables humans and AI agents to share canonical, versioned knowledge through MCP, with auditable provenance, review workflows, and reconciliation.
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    A
    maintenance
    Provides MCP clients with persistent storage, hybrid search, evidence checking, and automatic context compression, including fact slots, typed links, and lossless archival.
    MIT