save_memory
Writes a new long-term memory record with type, title, content, keywords, and optional relations so agents can preserve decisions, code changes, issues, and notes for later retrieval.
Instructions
把一条新的记忆写入长期库。
什么时候必须调用(Rule 里也有同样的约束):
做了一个影响后续架构/方案的决策
完成了一次代码修改,且改动原因从代码本身看不出来
排查清楚了一个非显而易见的缺陷
得到了一个以后会反复用到的结论
Args:
type: 记录类型。decision / code_change / issue / note / reference。
title: 一行摘要,要能脱离原文独立读懂(例:「改用独立浏览器上下文修复跨站污染」)。
content: 完整原文。建议包含:背景、做了什么、为什么这样做、还有什么没做。
keywords: 逗号分隔的关键词,用于以后检索(例:playwright,context,假阴性)。
relates_to: 可选,关联到已有记录,格式 ID:关系类型(例:D_0002:supersedes)。
Returns: JSON:{ok, id, ...}。拿到的 id 可以用于后续 relations。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"title": "<title>",
"content": "<content>"
},
"name": "save_memory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | ||
| title | Yes | ||
| content | Yes | ||
| keywords | No | ||
| relates_to | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |