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

蓝汐 · 潮汐认知图谱

by A16Nights

cg_link

Creates a directed semantic relationship between two memory nodes and records it in both the SQLite edge table and source file frontmatter, enabling traceable knowledge graph connections.

Instructions

在两个记忆节点之间建立有向语义关系(同时写入 SQLite 边表与源文件 frontmatter)。

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": {
      "sourceId": "<sourceId>",
      "targetId": "<targetId>"
    },
    "name": "cg_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
weightNo边权重,默认 1.0
relationNo关系类型,如 related_to、supports、derived_from、depends_on
sourceIdYes源节点 ID
targetIdYes目标节点 ID

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?

Because no annotations are supplied, the description must fully explain the tool's behavior. It does disclose the important side effect that the call writes in two places (SQLite 边表 and 源文件 frontmatter). However, it says nothing about whether edges may duplicate, whether missing node IDs cause an error, whether the call is idempotent, or whether the link can be undone. Those gaps matter for a mutation tool with no 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?

It is one compact sentence with the core purpose front-loaded and the dual-write detail in a parenthetical. Nothing is wasted, though there is no structure beyond the single sentence.

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?

It covers the purpose and the persistence side effect but leaves out error and precondition behavior and says nothing about what the call returns; there is no output schema to cover that. For a four-parameter mutation tool with no annotations, it is adequate but incomplete.

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 sourceId, targetId, relation, and weight are all documented in the schema itself. The description adds nothing about parameter semantics, such as how to choose a relation type or how weight enters the system. This is an acceptable baseline when the schema already documents every parameter.

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 uses a specific verb (建立, "establish/create") with a precise resource (在两个记忆节点之间建立有向语义关系, a directed semantic relation between two memory nodes). That is enough to distinguish it from read-only siblings such as cg_read or cg_graph. It does not name any sibling or explicitly state how it differs from cg_update, so it falls short of a 5.

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 offers no guidance on when to use this tool versus cg_update, cg_write, or cg_graph, and no prerequisites. A user could infer that it should be used to link nodes, but the description never says this and never mentions alternatives.

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