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

蓝汐 · 潮汐认知图谱

by A16Nights

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

NameRequiredDescriptionDefault
tagsNo标签数组
layerNo分层:anchor(永久锚点)、self(自我认知)、structural(架构/规律)、knowledge(通用知识,默认)、episodic(情景事件)、goals(目标)、unresolved(待解决问题)
titleNo可选标题(不填则自动从正文首行提取)
aliasesNo别名数组
contentYes记忆正文,支持 Markdown 与 [[目标ID]] 双向链接
protectedNo是否强制启用防衰减硬保护
importanceNo重要度 0~1,默认 0.5;>= 0.7 自动开启硬保护
valid_untilNo可选过期 Unix 秒时间戳

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses automatic validation, deduplication, and hard protection for importance >= 0.7 or anchor/self layers, but it omits permissions, failure behavior, duplicate resolution details, and what is returned after a write.

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 definition is a single front-loaded sentence with a compact parenthetical for behavioral details. It is efficient, though the parenthetical combines validation, deduplication, and protection rules densely.

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 the core write behavior plus validation, deduplication, and protection rules for a complex eight-parameter mutation tool. However, with no annotations or output schema, it should also clarify duplicate-handling outcomes, side effects, and how it relates to cg_update or cg_import_vault.

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 the input schema already explains all eight parameters in detail. The description restates the importance threshold and layer-based protection behavior but adds no parameter syntax or meaning beyond the 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?

The description states a specific verb and resource: writing a long-term memory node into a Markdown cognitive graph. It is clear what the tool does, but it does not differentiate this creation operation from siblings such as cg_update or cg_import_vault.

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 no explicit when-to-use guidance, no when-not-to-use conditions, and no alternatives. An agent must infer that this is the tool for creating memory nodes rather than updating or importing existing graph content.

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