cg_write
Write long-term memory nodes into a Markdown cognitive graph with automatic validation and deduplication, plus hard protection for high-importance or anchor-level entries.
Instructions
写入长期记忆节点到 Markdown 认知图(自动校验与去重;importance >= 0.7 或 anchor/self 层自动开启硬保护)。
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": {
"content": "<content>"
},
"name": "cg_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | 标签数组 | |
| layer | No | 分层:anchor(永久锚点)、self(自我认知)、structural(架构/规律)、knowledge(通用知识,默认)、episodic(情景事件)、goals(目标)、unresolved(待解决问题) | |
| title | No | 可选标题(不填则自动从正文首行提取) | |
| aliases | No | 别名数组 | |
| content | Yes | 记忆正文,支持 Markdown 与 [[目标ID]] 双向链接 | |
| protected | No | 是否强制启用防衰减硬保护 | |
| importance | No | 重要度 0~1,默认 0.5;>= 0.7 自动开启硬保护 | |
| valid_until | No | 可选过期 Unix 秒时间戳 |