Skip to main content
Glama
蓝汐 · 潮汐认知图谱

蓝汐 · 潮汐认知图谱

by A16Nights

cg_write

Writes long-term memory nodes into a Markdown cognitive graph, defaulting to episodic events while letting you assign knowledge, structural, or protected layers by importance.

Instructions

写入长期记忆节点到 Markdown 认知图(默认落 episodic 情景层;重要长期结论请显式指定 knowledge/structural;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

NameRequiredDescriptionDefault
tagsNo标签数组
layerNo分层:anchor(永久锚点)、self(自我认知)、structural(架构/规律)、knowledge(通用知识)、episodic(情景事件,默认)、goals(目标)、unresolved(待解决问题)
titleNo可选标题(不填则自动从正文首行提取)
aliasesNo别名数组
contentYes记忆正文,支持 Markdown 与 [[目标ID]] 双向链接
projectNo所属项目或工作区名(自动追加 项目:<name> 标签并提升同项目召回权重)
protectedNo是否强制启用防衰减硬保护
importanceNo重要度 0~1,默认 0.5;>= 0.7 可开启硬保护
confirmedByNo确认人(如 'user'),传入后自动视为 confirmed
valid_untilNo可选过期 Unix 秒时间戳
importanceSourceNo重要度来源:'hint'(AI 自评,未确认不自动硬锁)或 'confirmed'(已确认)
rejection_reasonNo可选:被否决/弃用方案的原因说明

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.1.1
    • addedInput schema / properties / confirmedBy
      Added value: +{
      +  "description": "确认人(如 'user'),传入后自动视为 confirmed",
      +  "type": "string"
      +}
    • changedInput schema / properties / importance / description
      Previous value: -"重要度 0~1,默认 0.5;>= 0.7 自动开启硬保护"New value: +"重要度 0~1,默认 0.5;>= 0.7 可开启硬保护"
    • addedInput schema / properties / importanceSource
      Added value: +{
      +  "description": "重要度来源:'hint'(AI 自评,未确认不自动硬锁)或 'confirmed'(已确认)",
      +  "enum": [
      +    "hint",
      +    "confirmed"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / layer / description
      Previous value: -"分层:anchor(永久锚点)、self(自我认知)、structural(架构/规律)、knowledge(通用知识,默认)、episodic(情景事件)、goals(目标)、unresolved(待解决问题)"New value: +"分层:anchor(永久锚点)、self(自我认知)、structural(架构/规律)、knowledge(通用知识)、episodic(情景事件,默认)、goals(目标)、unresolved(待解决问题)"
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "所属项目或工作区名(自动追加 项目:<name> 标签并提升同项目召回权重)",
      +  "type": "string"
      +}
    • addedInput schema / properties / rejection_reason
      Added value: +{
      +  "description": "可选:被否决/弃用方案的原因说明",
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden and does disclose two behavioral traits: the default layer outcome and the hard-protection mechanism tied to importance or layer. It says nothing about whether an existing node with the same title is overwritten or duplicated, whether writes are reversible, or what the call returns, which are significant gaps for a mutation tool with zero annotation coverage.

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 front-loaded sentence centered on the write action, with parenthetical qualifiers for layer choice and protection. It is dense but wastes no sentences. The nested parentheses make it slightly harder to parse on first read.

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 12-parameter mutation tool with no annotations and no output schema, the description covers the two most consequential semantics (default layer, protection threshold) but omits write-conflict behavior, duplicate handling, and return information. Adequate to call it, incomplete to predict its effects.

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%, so every parameter already carries its own explanation, and the description's note about importance >= 0.7 enabling hard protection largely restates the importance field description. The added value is the layer-selection heuristic, which contextualizes the enum choices. Baseline 3 is appropriate when the schema does the heavy lifting.

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 concrete verb and resource: writing a long-term memory node into a Markdown cognitive graph. It also frames the default target (episodic layer), which tells an agent what kind of object is being produced. It does not explicitly distinguish this from siblings like cg_update or cg_link, leaving that separation to inference.

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 gives real routing advice for the layer parameter: default to episodic, use knowledge/structural for important long-term conclusions. Protection triggers (importance >= 0.7 or anchor/self) are also named. However, there is no guidance on when to use cg_write versus cg_update, cg_link, or cg_import_vault, so the when-not/alternative half is missing.

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