Skip to main content
Glama

openmem

个人多 Agent 的统一记忆中枢:一个 PostgreSQL 库,一处写、全体读。

其他 AI 通过 MCP 接入;人通过 Web 控制台检索、问答、治理记忆。

它解决什么

问题

openmem 的做法

记忆散落在多个 agent / 文件

统一进 memory_entries,带向量与元数据

标准问题每个 bot 都重推一遍

preset_tools 预生成答案,秒回且可保鲜

需要「像问本人一样」的综合回答

mh_ask:检索记忆 + 画像 → LLM 回答,带引用

Related MCP server: MCP AI Memory

架构

MCP clients (Claude / Codex / bots / …)
        │
        ▼
   server.js  ──spawn──►  mem_core.py  ──►  PostgreSQL (openmem)
   :3466 MCP                    │
                                ├── Embeddings API(OpenAI 兼容)
                                └── Chat LLM API(OpenAI 兼容)
   web_server.py :3467  ────────┘
   (Web 控制台,复用同一内核)
  • server.js:MCP 层(stdio / Streamable HTTP),工具转发到 Python 内核

  • mem_core.py:业务内核 + CLI(写入、混合检索、咨询、预设工具、导入)

  • web_server.py + web_page.html:Web 控制台

  • cred_guard.py:写库前打码(防明文密钥进记忆)

数据表

用途

memory_entries

记忆正文 + embedding + pinned / superseded 链

memory_conflicts

治理待审冲突

preset_tools

预生成答案(prompt + 缓存 + 保鲜周期)

ask_log

咨询日志与引用

app_config

运行配置(persona / 模型 / key 等,覆盖环境变量默认值)

建库:

createdb openmem
psql openmem -f schema.sql

快速开始

1. 依赖

  • Node.js 18+

  • Python 3.10+:psycopg2-binaryrequests(见 requirements.txt

  • PostgreSQL 14+

  • OpenAI 兼容的 embeddingschat 端点

npm install   # @modelcontextprotocol/sdk + zod(若未提供 package.json,按需安装)
python -m pip install -r requirements.txt

2. 配置

cp .env.example .env
# 编辑 .env:PG、LLM、embedding 等

进程启动时会自动读项目根目录的 .env不要提交)。

可选本地文件(均 gitignore):

文件

用途

persona.local.txt

mh_ask 默认主人画像(Web 设置若已保存则以库为准)

cred_guard_local.py

短口令精确替换表(公开仓 cred_guard.py 默认空表)

3. 启动

# MCP over HTTP
node server.js --http 3466

# MCP over stdio
node server.js

# Web 控制台
python web_server.py --port 3467

MCP 接入

HTTP:

{ "mcpServers": { "openmem": { "url": "http://127.0.0.1:3466/mcp" } } }

stdio:

{ "mcpServers": { "openmem": { "command": "node", "args": ["./server.js"] } } }

MCP 工具

工具

作用

mh_write

写入记忆(source 必填;layer k/m)

mh_update

按 id 原地更新(保留 id,重算向量)

mh_search

混合检索(向量 + 元数据过滤)

mh_get

按 id 取单条

mh_service

服务台账按名查询(若已导入 agent-matrix)

mh_ask

AI 对 AI 咨询,答案带 REF 引用

mh_tool / mh_tools_list

预生成答案(秒回)

mh_status

健康与统计

建议优先级:标准问题 → mh_tool → 需要原始片段 → mh_search → 需要综合口吻 → mh_ask

写入示例:

mh_write(content="…结论/坑…", source="<agent名>", layer="m",
         category="lessons", tags=["…"], confidence=0.8)

Web 控制台

默认 http://127.0.0.1:3467无鉴权,勿对公网裸奔)。

页签

能力

检索

语义检索 + 高亮,可编辑/删除

浏览

分页 + 分类/来源过滤

问问

流式问答、引用卡片、历史

预设工具

查看/刷新缓存答案

入职包

导出新 agent 需要的钉住事实与工具清单

AI 设置

提示词 / 模型 / key(写入 app_config,即时生效)

主要 API:/api/stats /api/search /api/browse /api/ask_stream /api/tools /api/config /api/health 等。

CLI(不经 MCP)

python mem_core.py write --content "..." --source me --layer m --category lessons
python mem_core.py search --query "..." --top_k 5
python mem_core.py ask --query "..." --agent mybot
python mem_core.py status

辅助脚本

文件

用途

import_sources.py

从本地 markdown 目录批量导入(路径请按环境改)

import_agentmatrix.py

服务总表目录指纹同步导入

mcp_call.py

命令行调用 MCP 工具

audit_*.py

一次性审计/聚类辅助

配置优先级

对 AI 问答相关项(模型、key、persona 等):

数据库 app_config  >  环境变量 / .env  >  代码默认值

安全

  • 密钥只放 .env 或服务环境变量,不要写进源码或提交 git

  • cred_guard 是写入时的尽力打码,不能替代密钥治理

  • Web / MCP 默认无鉴权:本机或反向代理 + 认证后再暴露

License

按你的仓库选择(例如 MIT)。

Available Tools

9 tools
mh_askA

AI 对 AI 咨询:像直接问老大陈丹本人一样提问,openmem 基于全部记忆给出完整、准确、口语化的答案(走 litellm GwV4F,数秒级,较慢)。只在 mh_tool 里没有对应成品答案、且问题需要理解+综合时才用:要标准答案走 mh_tool(秒回),要原始记忆片段走 mh_search(更快)。

ParametersJSON Schema
NameRequiredDescriptionDefault
agentNo提问方 agent 名unknown-agent
queryYes要问老大/问记忆的问题

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that the tool is slower (seconds-level), uses litellm GwV4F, and produces answers by synthesizing all memories. It doesn't mention error handling or side effects, but for a consultation tool this is adequate. It adds value beyond the schema by noting the performance characteristic.

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?

The description is two sentences, front-loaded with the core purpose and then providing usage guidelines with bold for emphasis. It is concise, well-structured, and every sentence earns its place. The key constraints (when to use, speed) are highlighted effectively.

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

Completeness5/5

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

For a simple 2-parameter tool with no output schema, the description provides all necessary information: what it does, when to use it, how it differs from siblings, and its performance characteristics. An agent can confidently decide and call this tool correctly based on this description alone.

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%, meaning both parameters (query and agent) are already described in the schema. The description adds no additional semantic detail about parameters, so the baseline score of 3 applies. It doesn't compensate for any gaps because there are none.

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?

The description clearly states the tool's purpose: an AI-to-AI consultation that answers questions based on all memories, giving complete, accurate, and colloquial answers. It explicitly distinguishes from siblings by naming mh_tool for standard answers and mh_search for raw memory fragments, making the unique role unambiguous.

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?

It gives explicit when-to-use guidance: only when mh_tool lacks a ready-made answer and the question requires understanding and synthesis. It also states when not to use it, directing to mh_tool for standard answers and mh_search for raw memory, with speed comparisons. This leaves no ambiguity for the agent.

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

mh_getA

按 id 取单条记忆完整内容。

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations provided, the description carries the behavioral burden. '取' and '完整内容' make clear this is a read operation returning the full memory, but it does not mention behavior for missing ids, output format, permissions, or potential side effects. For a simple get operation this is acceptable but not rich.

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?

The entire description is one short, front-loaded sentence with no filler. It conveys the key action, object, and selection criterion efficiently.

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 single-id fetch operation, the description covers the essential action. However, with no output schema and no annotations, it leaves open the exact return structure and edge-case behavior (e.g., non-existent id). The description is minimally viable but not fully self-sufficient for an agent operating without additional context.

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?

The schema documents 'id' as a required UUID but provides no description (0% coverage). The description adds that the id selects a single memory, which is useful, but beyond that it does not elaborate on the parameter's meaning or constraints. The parameter is simple enough that the schema plus minimal reference is adequate.

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?

The description uses a clear verb ('取' / get) and a specific resource ('单条记忆完整内容' / full content of a single memory), and explicitly ties retrieval to an id. This distinguishes it from sibling tools like mh_search (query-based) and mh_write/mh_update (mutating operations).

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 description implies when to use the tool: when you have a known id and need the complete memory record rather than search results. However, it does not explicitly contrast with mh_search or state when not to use it, leaving the routing partially implicit.

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

mh_serviceA

查本机 nssm 服务台账:按服务名返回该服务的启动参数/端口/路径等配置明细(不走语义检索,按名精确匹配)。不知道确切名字就先不传 name,会列出全部服务名。

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo服务名关键词,如 dsh / claude / visionqa;留空列出全部服务名

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and it discloses key behaviors: exact-name matching rather than semantic search, and a list-all fallback when 'name is empty. It also previews return content including startup parameters, port, and path, which goes beyond a generic query description.

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 front-load the core operation and then provide the key behavioral caveat and fallback instruction. There is no filler or redundant restatement of structured fields.

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

Completeness5/5

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

For a simple tool with one optional parameter and no output schema, the description is complete: it tells the agent what is returned, how matching works, and what to do when the name is unknown. Nothing necessary for correct invocation is missing.

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%, so the baseline is 3, but the description adds real value by clarifying that the name must be exact and that omitting it triggers a full list, which is more specific than the schema's '关键词' phrasing. This helps the agent use the single parameter correctly without opening the schema.

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?

The description states a specific verb ('查') and resource ('本机 nssm 服务台账'), and further scopes behavior to exact-name matching with a non-semantic-search caveat. This makes it clearly distinguishable from semantic-search siblings like mh_search.

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 explicitly instructs the agent to omit 'name' when the exact service name is unknown, resulting in a list-all-services fallback, and states that exact matching is required. It does not explicitly name alternative tools for fuzzy/semantic lookup, but the '不走语义检索' caveat implies that boundary clearly enough.

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

mh_statusB

openmem 健康状态:总条数/钉住数/归档数/待审冲突/工具数/咨询次数。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what metrics are reported but does not explicitly say the operation is read-only, whether it has side effects, what permissions are needed, or how the data is returned. The read-only nature is only inferred from 'status'.

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?

The description is a single compact sentence that front-loads the tool's purpose and immediately lists the six key metrics. There is no redundant filler, and every element contributes to understanding what the tool provides.

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?

The description covers what metrics are included, but with no output schema and no annotations, it leaves out details about the return format, data types, and whether the operation is strictly read-only. For a simple status tool it is adequate, but it is not fully complete for an agent needing to interpret the response reliably.

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?

The tool has zero parameters, so the baseline is 4. The description adds meaningful context by listing the categories of data the no-argument call will return, which helps the agent understand the call's output even though there is no parameter schema to enrich.

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 identifies a specific resource ('openmem 健康状态') and enumerates six concrete metrics it reports (总条数/钉住数/归档数/待审冲突/工具数/咨询次数). It goes beyond the bare tool name, though it lacks an explicit verb. It is reasonably distinguishable from sibling tools like mh_write or mh_search because it clearly denotes a status/overview operation.

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 phrase '健康状态' implies this tool is used for health/status checks, but the description provides no explicit when-to-use guidance, exclusions, or comparison with sibling tools. There is an implied usage context, but no direct routing or alternatives are mentioned.

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

mh_toolA

【首选 · 秒回】调用预生成答案工具:标准化提示词 + 后台已备好最新最准的答案,不走 LLM、几乎零等待。凡「老大是什么人 / 偏好习惯 / 铁律清单 / 本机环境 / 服务与端口 / 12 bot 花名册 / 项目索引 / openmem 使用手册」这类标准问题一律先用这个,别用 mh_search 现搜、更别凭印象猜。不知道有哪些成品答案就先调 mh_tools_list(一次看清全部 + 新鲜度)。

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes工具名,如 主人的喜好
force_refreshNo强制重新生成

TDQS

A4.3/5.0
Behavior4/5

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

Discloses that it uses pre-generated answers, does not invoke the LLM, and returns near-instantly, which is key behavioral context. With no annotations, this is the primary source of behavioral information, though it does not cover failure modes or side effects of force_refresh.

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?

The description is longer than typical but front-loads the core purpose and includes structured examples and bolded guidance. Every sentence serves a purpose, though it could be tightened.

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 two-parameter retrieval tool, the description covers purpose, usage, and discovery guidance. It lacks output format details, but that is acceptable given no output schema and the simplicity of the tool.

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?

The schema already describes both parameters with 100% coverage, so the description adds little beyond the example name. It does not clarify semantics further than the schema does.

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?

The description clearly identifies the tool as a caller for pre-generated answers, with a specific resource (standard questions) and distinguishes it from mh_search. It lists concrete categories, making the purpose unmistakable.

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?

Explicitly instructs to use this tool for standard questions first, forbids using mh_search instead, and directs to mh_tools_list for discovery. Provides both positive and negative usage guidance.

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

mh_tools_listB

列出全部预生成答案工具及答案新鲜度。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the burden. The description only states what it lists but doesn't disclose any behaviors like whether it requires authentication, whether it returns stale data, or whether it makes external calls. It doesn't contradict anything, but it's thin on 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.

Conciseness4/5

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

The description is a single sentence in Chinese, which is concise and to the point. It front-loads the purpose ('列出全部预生成答案工具') and adds the extra detail (freshness). It could be slightly more structured but it's efficient.

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 listing tool with no parameters, the description provides the essential what (list) and the extra (freshness). It doesn't describe the output format, but since there's no output schema, the description might need to hint at what 'freshness' means, but it's not critical. It's minimally complete.

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 zero parameters, the description doesn't need to explain parameter semantics. The schema is empty, and the description correctly avoids mentioning parameters. A baseline of 4 is not necessary because there's nothing to compensate for.

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 states a specific purpose: listing all pre-generated answer tools and providing freshness information. It is clear about the resource (pre-generated answer tools) and the action (list). It doesn't explicitly distinguish from siblings, but the siblings have different names suggesting different functions.

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 description implies when to use it (when you need an overview of available pre-generated tools and their freshness), but it doesn't explicitly state when not to use it or mention alternatives. For a tool with no parameters, context is limited, so a 3 is reasonable.

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

mh_updateA

按 id 原地更新一条记忆(改错字、补内容、转 pinned、换 category 都用这个)。只改传了的字段,未传的保持不动;改了 content 会自动重算向量与 hash。保留 id,不打断 superseded_by / 冲突记录引用链——优于"删了重写"。改内容前建议先 mh_get 看一眼原文。

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes要更新的条目 id
tagsNo给了就整组替换,不给则不动
layerNo
pinnedNotrue/false;不给则不动
sourceNo
contentNo新内容(给了就整条替换并重算向量)
categoryNo
confidenceNo

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states partial-update semantics (only provided fields change), automatic vector and hash recomputation when content changes, and id preservation that doesn't break superseded_by/conflict reference chains. It doesn't mention error cases or permission requirements, but the core behavioral traits are well disclosed.

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?

The description is compact and front-loaded: the first sentence states the action and use cases, the second explains the partial-update semantics and side effects, and the third gives the id-preservation rationale and a practical recommendation. Every sentence earns its place with no filler.

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 an 8-parameter mutation tool with no annotations and no output schema, the description covers the essential behavioral contract: partial updates, side effects, and id preservation. It doesn't describe return values or error conditions, but the core semantics an agent needs to invoke it correctly are present. The recommendation to use mh_get first adds practical completeness.

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 description coverage is 50%, and the description adds meaningful semantics beyond the schema: it explains the in-place partial-update model ('只改传了的字段,未传的保持不动'), the vector/hash recomputation side effect for content, and the id-preservation guarantee. This compensates well for the parameters that lack schema descriptions (layer, source, category, confidence).

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?

The description states a specific verb ('原地更新' / in-place update) and resource ('一条记忆'), and enumerates concrete use cases (fixing typos, supplementing content, toggling pinned, changing category). It also explicitly distinguishes itself from the alternative '删了重写' (delete-and-recreate), which differentiates it from sibling tools like mh_write.

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?

The description gives explicit when-to-use guidance: use this for in-place updates to preserve id and reference chains, and it explicitly recommends reading the original with mh_get before modifying content. It also names the alternative approach ('删了重写') and explains why this tool is superior, giving clear context for when to choose this over other operations.

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

mh_writeC

写入一条记忆/知识到老大的统一记忆中枢(openmem)。source 必填=写入方 agent 名。layer: k=知识 m=记忆。category: rules/facts/projects/lessons/knowledge/archive/verification/services/capabilities/misc(或项目名如 dsh / agents-to-feishu)。重要结论不写入=任务不算完成。

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo标签列表
layerNok=知识 m=记忆k
pinnedNo关键事实钉住,免疫自动归档
sourceYes写入方 agent 名,如 codex / dsh / WorkBuddy
contentYes记忆内容正文
categoryNorules/facts/projects/lessons/knowledge/archive/verification/services/capabilities/misc,或项目名如 dsh / agents-to-feishumisc
confidenceNo

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It confirms the write nature and the mandatory completion rule, but does not mention whether the operation is new-entry-only, whether it can overwrite or merge, authentication/permissions, or any failure/error behavior. For a mutation tool with zero annotation coverage, this is a meaningful transparency gap.

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?

The description is concise and front-loads the core action, then lists the essential parameter semantics in compact clauses. It avoids excessive wording and every sentence adds information. The only minor loss is a slightly disorganized ordering of requirements, but overall it is well-suited for an efficient read.

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?

Given the tool has 7 parameters and no output schema, the description leaves several operational gaps: it doesn't state what the tool returns, how errors are signaled, or exactly what happens when a new entry conflicts with existing data. It also does not differentiate between writing a new memory and updating/replacing one via siblings. These are non-trivial details an agent needs to reliably invoke and verify the operation.

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 86% schema coverage, the schema already documents most parameters. The description reinforces layer/category semantics and adds the 'important conclusions must be persisted' rule, but it mostly duplicates the schema's own parameter descriptions. It does not add per-parameter nuance that goes beyond the schema, so the baseline of 3 is appropriate.

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 starts with a clear verb and object (写一条记忆/知识 to the memory hub), explicitly names the target resource (openmem), and constrains it with required source, layer, and category values. It does not explicitly contrast itself with the sibling mh_update, but the verb 'write' versus 'update' strongly suggests a create-style operation.

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

Usage Guidelines2/5

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

The description gives a high-level condition (重要结论不写入=任务不算完成), which implies that important conclusions should be written here, but it does not state when not to use it or mention alternatives like mh_update or mh_service. There is no inclusion/exclusion guidance or reference to other tools, leaving an agent to infer when to switch to a sibling tool.

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. 9 tool updatesv0.1.0
    • First observedmh_ask
    • First observedmh_get
    • First observedmh_search
    • First observedmh_service
    • First observedmh_status
    • First observedmh_tool
    • First observedmh_tools_list
    • First observedmh_update
    • First observedmh_write

TDQS

A3.8/5.0

Scored across 9 tools

Disambiguation4/5

The tools have distinct purposes, and the descriptions explicitly separate raw memory search (mh_search), synthesized answers (mh_ask), and pre-generated answers (mh_tool). Some risk remains because these three query-ish tools overlap in intent, but the guardrails in the descriptions are strong enough to guide selection.

Naming Consistency4/5

All tool names use the consistent lowercase mh_ prefix and mostly follow a verb-based pattern like write, update, search, get, ask, and status. The noun-style exceptions mh_service, mh_tool, and mh_tools_list are minor deviations, and tools_list also reverses the expected order slightly.

Tool Count5/5

Nine tools is well-scoped for a memory hub: core memory operations (write/get/search/update), specialized lookups (service/tool), and meta/status tools are all represented. Each tool has a clear role and none feel redundant.

Completeness4/5

The surface covers create, read, update, query, status, and specialized lookup workflows well. There is no explicit delete or conflict-resolution tool even though mh_status surfaces pending conflicts, but this may be intentional and can be worked around via archive/update and category changes.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI assistants to store and retrieve long-term memories using PostgreSQL with vector similarity search. Supports semantic memory operations, tagging, and real-time updates for persistent learning across conversations.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to store, retrieve, and manage contextual knowledge across sessions using semantic search with PostgreSQL and vector embeddings. Supports memory relationships, clustering, multi-agent isolation, and intelligent caching for persistent conversational context.
    11 npm
    48
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to store and retrieve long-term memories with semantic search, supporting various memory types and tags via PostgreSQL and pgvector.
    11 npm
    MIT