Skip to main content
Glama

link_memory

Creates a directed relationship between two stored memories using source and target IDs plus a relation type, so agents can model dependencies, causes, or supersession.

Instructions

建立两条记忆之间的有向关系。

Args: source_id: 起点 ID,如 D_0003。 target_id: 终点 ID,如 D_0001。 relation_type: 关系名,如 supersedes / caused_by / related_to / implements。

Returns: JSON:{ok, source_id, target_id, relation_type}

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": {
      "source_id": "<source_id>",
      "target_id": "<target_id>",
      "relation_type": "<relation_type>"
    },
    "name": "link_memory"
  }
}

Input Schema

NameRequiredDescriptionDefault
source_idYes
target_idYes
relation_typeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.1/5.0
Behavior2/5

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

Annotations are absent, so the description carries the full burden. It discloses that the link is directed and gives the return shape, but says nothing about whether an existing relation is overwritten, what happens if either ID is invalid, or what permissions are required for a mutation.

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?

Front-loaded single-sentence purpose followed by a compact Args block, which is efficient. The Returns line slightly duplicates what the existing output schema already conveys.

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 output schema exists and annotations are absent, so the description needed to cover behavioral edges of a create-link operation. It covers parameter meaning and return shape but not duplicate handling, validation failures, or directionality semantics beyond the word 'directed'.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it largely does: source_id is the start node, target_id the end node, with ID format examples (`D_0003`) and concrete relation_type values (supersedes / caused_by / related_to / implements). Constraints like case sensitivity are still absent.

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?

States a specific verb and resource: creating a directed relationship between two memories. This is clearly distinct from the siblings (search_memory, read_raw_data, save_memory), though the description never explicitly says so.

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?

No guidance on when to use this instead of save_memory, whether both memories must already exist, whether repeated links are idempotent, or how direction should be chosen. The only usage hint is the example relation-type list.

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

Deploy Server

Other Tools